diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-09 19:47:38 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-09 19:47:38 +0000 |
commit | da8f43fd34d59a83ee8314dae5850db95ac1bdad (patch) | |
tree | fb6e0cd8e8b8fd7341b9a3ceb3970580eed0867c | |
parent | ca3c981c07ade7f8fd50ba4bb452a2fadaddc326 (diff) | |
download | busybox-w32-da8f43fd34d59a83ee8314dae5850db95ac1bdad.tar.gz busybox-w32-da8f43fd34d59a83ee8314dae5850db95ac1bdad.tar.bz2 busybox-w32-da8f43fd34d59a83ee8314dae5850db95ac1bdad.zip |
build system: fix for non-i386 builds
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.custom | 30 | ||||
-rw-r--r-- | Makefile.flags | 4 | ||||
-rw-r--r-- | Makefile.help | 52 | ||||
-rw-r--r-- | arch/i386/Makefile | 5 |
5 files changed, 14 insertions, 79 deletions
@@ -2,7 +2,7 @@ VERSION = 1 | |||
2 | PATCHLEVEL = 2 | 2 | PATCHLEVEL = 2 |
3 | SUBLEVEL = 1 | 3 | SUBLEVEL = 1 |
4 | EXTRAVERSION = .svn | 4 | EXTRAVERSION = .svn |
5 | NAME=Unnamed | 5 | NAME = Unnamed |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
diff --git a/Makefile.custom b/Makefile.custom index c0984e17a..1733232e0 100644 --- a/Makefile.custom +++ b/Makefile.custom | |||
@@ -1,30 +1,6 @@ | |||
1 | ### # defconfig is allyesconfig minus any features that are specialized enough | 1 | # ========================================================================== |
2 | ### # or cause enough behavior change that the user really should switch them on | 2 | # Build system |
3 | ### # manually if that's what they want. Sort of "maximum sane config". | 3 | # ========================================================================== |
4 | |||
5 | ### defconfig: scripts/config/conf | ||
6 | ### @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null | ||
7 | ### @$(SED) -i -r -e "s/^(CONFIG_(DEBUG.*|STATIC|SELINUX|NITPICK|BUILD_(AT_ONCE|LIBBUSYBOX)|FEATURE_(DEVFS|FULL_LIBBUSYBOX|SHARED_BUSYBOX|MTAB_SUPPORT|CLEAN_UP|UDHCP_DEBUG)|INSTALL_NO_USR))=.*/# \1 is not set/" .config | ||
8 | ### @./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null | ||
9 | |||
10 | ### allbareconfig: scripts/config/conf | ||
11 | ### @./scripts/config/conf -y $(CONFIG_CONFIG_IN) > /dev/null | ||
12 | ### @$(SED) -i -r -e "s/^(CONFIG_(DEBUG|STATIC|SELINUX|DEVFSD|NC_GAPING_SECURITY_HOLE|BUILD_AT_ONCE)).*/# \1 is not set/" .config | ||
13 | ### @$(SED) -i -e "/FEATURE/s/=.*//;/^[^#]/s/.*FEATURE.*/# \0 is not set/;" .config | ||
14 | ### @echo "CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y" >> .config | ||
15 | ### @yes n | ./scripts/config/conf -o $(CONFIG_CONFIG_IN) > /dev/null | ||
16 | |||
17 | ### hosttools: | ||
18 | ### $(Q)cp .config .config.bak || noold=yea | ||
19 | ### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" allnoconfig | ||
20 | ### $(Q)mv .config .config.in | ||
21 | ### $(Q)(grep -v CONFIG_SED .config.in ; \ | ||
22 | ### echo "CONFIG_SED=y" ; ) > .config | ||
23 | ### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" oldconfig include/bb_config.h | ||
24 | ### $(Q)$(MAKE) CC="$(HOSTCC)" CFLAGS="$(HOSTCFLAGS) $(INCS)" busybox | ||
25 | ### $(Q)[ -f .config.bak ] && mv .config.bak .config || rm .config | ||
26 | ### mv busybox sed | ||
27 | ### @echo "Now do: $(MAKE) SED=$(objtree)/sed <target>" | ||
28 | 4 | ||
29 | %.bflt: %_unstripped | 5 | %.bflt: %_unstripped |
30 | $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@ | 6 | $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@ |
diff --git a/Makefile.flags b/Makefile.flags index f5eb65faf..a6ad10bf6 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -1,5 +1,5 @@ | |||
1 | # ========================================================================== | 1 | # ========================================================================== |
2 | # Building | 2 | # Build system |
3 | # ========================================================================== | 3 | # ========================================================================== |
4 | 4 | ||
5 | BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 5 | BB_VER = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
@@ -13,7 +13,7 @@ CPPFLAGS += \ | |||
13 | -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP \ | 13 | -D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP \ |
14 | -Wall -Wstrict-prototypes -Wshadow -Werror \ | 14 | -Wall -Wstrict-prototypes -Wshadow -Werror \ |
15 | -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ | 15 | -funsigned-char -fno-builtin-strlen -finline-limit=0 -static-libgcc \ |
16 | -Os -march=i386 -mpreferred-stack-boundary=2 \ | 16 | -Os -mpreferred-stack-boundary=2 \ |
17 | -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ | 17 | -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ |
18 | -fomit-frame-pointer -ffunction-sections -fdata-sections \ | 18 | -fomit-frame-pointer -ffunction-sections -fdata-sections \ |
19 | -funsigned-char -fno-builtin-strlen \ | 19 | -funsigned-char -fno-builtin-strlen \ |
diff --git a/Makefile.help b/Makefile.help index 3ba68d1e4..a1ff4fcb8 100644 --- a/Makefile.help +++ b/Makefile.help | |||
@@ -1,52 +1,6 @@ | |||
1 | ### Kernel's one: | 1 | # ========================================================================== |
2 | ### help: | 2 | # Build system |
3 | ### @echo 'Cleaning targets:' | 3 | # ========================================================================== |
4 | ### @echo ' clean - remove most generated files but keep the config' | ||
5 | ### @echo ' mrproper - remove all generated files + config + various backup files' | ||
6 | ### @echo '' | ||
7 | ### @echo 'Configuration targets:' | ||
8 | ### @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help | ||
9 | ### @echo '' | ||
10 | ### @echo 'Other generic targets:' | ||
11 | ### @echo ' all - Build all targets marked with [*]' | ||
12 | ### @echo '* busybox - Build the bare kernel' | ||
13 | ### @echo '* modules - Build all modules' | ||
14 | ### @echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)' | ||
15 | ### @echo ' dir/ - Build all files in dir and below' | ||
16 | ### @echo ' dir/file.[ois] - Build specified target only' | ||
17 | ### @echo ' dir/file.ko - Build module including final link' | ||
18 | ### @echo ' rpm - Build a kernel as an RPM package' | ||
19 | ### @echo ' tags/TAGS - Generate tags file for editors' | ||
20 | ### @echo ' cscope - Generate cscope index' | ||
21 | ### @echo ' kernelrelease - Output the release version string' | ||
22 | ### @echo ' kernelversion - Output the version stored in Makefile' | ||
23 | ### @echo '' | ||
24 | ### @echo 'Static analysers' | ||
25 | ### @echo ' checkstack - Generate a list of stack hogs' | ||
26 | ### @echo ' namespacecheck - Name space analysis on compiled kernel' | ||
27 | ### @echo '' | ||
28 | ### @echo 'Kernel packaging:' | ||
29 | ### @$(MAKE) $(build)=$(package-dir) help | ||
30 | ### @echo '' | ||
31 | ### @echo 'Documentation targets:' | ||
32 | ### @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp | ||
33 | ### @echo '' | ||
34 | ### @echo 'Architecture specific targets ($(ARCH)):' | ||
35 | ### @$(if $(archhelp),$(archhelp),\ | ||
36 | ### echo ' No architecture specific help defined for $(ARCH)') | ||
37 | ### @echo '' | ||
38 | ### @$(if $(boards), \ | ||
39 | ### $(foreach b, $(boards), \ | ||
40 | ### printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ | ||
41 | ### echo '') | ||
42 | ### | ||
43 | ### @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' | ||
44 | ### @echo ' make O=dir [targets] Locate all output files in "dir", including .config' | ||
45 | ### @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)' | ||
46 | ### @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)' | ||
47 | ### @echo '' | ||
48 | ### @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | ||
49 | ### @echo 'For further info see the ./README file' | ||
50 | 4 | ||
51 | help: | 5 | help: |
52 | @echo 'Cleaning:' | 6 | @echo 'Cleaning:' |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile new file mode 100644 index 000000000..b9af293a0 --- /dev/null +++ b/arch/i386/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # ========================================================================== | ||
2 | # Build system | ||
3 | # ========================================================================== | ||
4 | |||
5 | CPPFLAGS += -march=i386 | ||