Added more default CFLAGS for better comaptibility with Ubuntu toolchain. Added the '-Os' flag which produces smaller output files. These changes haven't been tested yet.
This commit is contained in:
parent
3fd9ada9a9
commit
fe195af1ae
@ -39,7 +39,9 @@ fi
|
||||
# Good explanation of the different kernels:
|
||||
# http://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vmlinux
|
||||
echo "Building kernel..."
|
||||
make bzImage -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
make \
|
||||
CFLAGS="-Os -fno-stack-protector -U_FORTIFY_SOURCE" \
|
||||
bzImage -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
# Install kernel headers in './usr' (this is not '/usr') which are used later
|
||||
# when we build and configure the GNU C library (glibc).
|
||||
|
@ -30,7 +30,13 @@ cd ../glibc_objects
|
||||
# will be installed in '/lib'. Kernel headers are taken from our already prepared
|
||||
# kernel header area (see 02_build_kernel.sh). Packages 'gd' and 'selinux' are disabled.
|
||||
echo "Configuring glibc..."
|
||||
../configure --prefix= --with-headers=$WORK_KERNEL_DIR/usr/include --without-gd --without-selinux --disable-werror
|
||||
../configure \
|
||||
--prefix= \
|
||||
--with-headers=$WORK_KERNEL_DIR/usr/include \
|
||||
--without-gd \
|
||||
--without-selinux \
|
||||
--disable-werror \
|
||||
CFLAGS="-Os -fno-stack-protector -U_FORTIFY_SOURCE"
|
||||
|
||||
# Compile glibc with optimization for "parallel jobs" = "number of processors".
|
||||
echo "Building glibc..."
|
||||
|
@ -50,7 +50,9 @@ sed -i "s/.*CONFIG_SYSROOT.*/CONFIG_SYSROOT=$GLIBC_INSTALLED_ESCAPED/" .config
|
||||
|
||||
# Compile busybox with optimization for "parallel jobs" = "number of processors".
|
||||
echo "Building BusyBox..."
|
||||
make EXTRA_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" busybox -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
make \
|
||||
EXTRA_CFLAGS="-Os -fno-stack-protector -U_FORTIFY_SOURCE" \
|
||||
busybox -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
# Create the symlinks for busybox. The file 'busybox.links' is used for this.
|
||||
echo "Generating BusyBox based initramfs area..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user