diff --git a/config/arch.arm b/config/arch.arm index dea0c52e0f..3e96b90a98 100644 --- a/config/arch.arm +++ b/config/arch.arm @@ -27,21 +27,25 @@ arm1176jzf-s) TARGET_SUBARCH=armv6zk TARGET_ABI=eabi - TARGET_EXTRA_FLAGS="-mfloat-abi=softfp -Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_EXTRA_FLAGS="-Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU" ;; cortex-a8) TARGET_SUBARCH=armv7-a TARGET_ABI=eabi - TARGET_EXTRA_FLAGS="" + TARGET_EXTRA_FLAGS="-Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU" ;; cortex-a9) TARGET_SUBARCH=armv7-a TARGET_ABI=eabi - TARGET_EXTRA_FLAGS="-mfloat-abi=softfp -Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_EXTRA_FLAGS="-Wno-psabi -Wa,-mno-warn-deprecated" + TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU" ;; esac # setup ARCH specific *FLAGS TARGET_CFLAGS="-march=$TARGET_SUBARCH -mcpu=$TARGET_CPU -mabi=aapcs-linux $TARGET_EXTRA_FLAGS" - [ -n "$TARGET_FPU" ] && TARGET_CFLAGS="$TARGET_CFLAGS -mfpu=$TARGET_FPU" + [ -n "$TARGET_FPU" ] && TARGET_CFLAGS="$TARGET_CFLAGS $TARGET_FPU_FLAGS" TARGET_LDFLAGS="-fPIC -march=$TARGET_SUBARCH -mtune=$TARGET_CPU" + GCC_OPTS="--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU" diff --git a/config/functions b/config/functions index fb74d89ea4..e294402806 100644 --- a/config/functions +++ b/config/functions @@ -228,6 +228,7 @@ show_config() { config_message="$config_message\n $dashes$dashes" config_message="$config_message\n - CPU (ARCH):\t\t\t\t $TARGET_CPU ($TARGET_ARCH)" + config_message="$config_message\n - FLOAT:\t\t\t\t $TARGET_FLOAT" config_message="$config_message\n - FPU:\t\t\t\t\t $TARGET_FPU" config_message="$config_message\n - Optimizations:\t\t\t $OPTIMIZATIONS" config_message="$config_message\n - LTO (Link Time Optimization) support: $LTO_SUPPORT" diff --git a/packages/graphics/bcm2835-driver/build b/packages/graphics/bcm2835-driver/build index 47ba4cb60d..7ddadfb6da 100755 --- a/packages/graphics/bcm2835-driver/build +++ b/packages/graphics/bcm2835-driver/build @@ -22,9 +22,15 @@ . config/options $1 +if [ "$TARGET_FLOAT" = "softfp" -o "$TARGET_FLOAT" = "soft" ]; then + FLOAT="softfp" +elif [ "$TARGET_FLOAT" = "hard" ]; then + FLOAT="hardfp" +fi + cd $PKG_BUILD mkdir -p $SYSROOT_PREFIX/usr/include - cp -PR softfp/opt/vc/include/* $SYSROOT_PREFIX/usr/include + cp -PR $FLOAT/opt/vc/include/* $SYSROOT_PREFIX/usr/include mkdir -p $SYSROOT_PREFIX/usr/lib - cp -PR softfp/opt/vc/lib/*.so* $SYSROOT_PREFIX/usr/lib + cp -PR $FLOAT/opt/vc/lib/*.so* $SYSROOT_PREFIX/usr/lib diff --git a/packages/graphics/bcm2835-driver/install b/packages/graphics/bcm2835-driver/install index 76520b67d3..479eea8d09 100755 --- a/packages/graphics/bcm2835-driver/install +++ b/packages/graphics/bcm2835-driver/install @@ -22,11 +22,17 @@ . config/options $1 +if [ "$TARGET_FLOAT" = "softfp" -o "$TARGET_FLOAT" = "soft" ]; then + FLOAT="softfp" +elif [ "$TARGET_FLOAT" = "hard" ]; then + FLOAT="hardfp" +fi + mkdir -p $INSTALL/usr/sbin - cp -PR $PKG_BUILD/softfp/opt/vc/sbin/* $INSTALL/usr/sbin + cp -PR $PKG_BUILD/$FLOAT/opt/vc/sbin/* $INSTALL/usr/sbin mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/softfp/opt/vc/lib/*.so* $INSTALL/usr/lib + cp -PR $PKG_BUILD/$FLOAT/opt/vc/lib/*.so* $INSTALL/usr/lib mkdir -p $INSTALL/opt/vc ln -sf /usr/lib $INSTALL/opt/vc/lib \ No newline at end of file diff --git a/packages/toolchain/lang/gcc-core/build b/packages/toolchain/lang/gcc-core/build index 8ac5ec13ab..c135c90d60 100755 --- a/packages/toolchain/lang/gcc-core/build +++ b/packages/toolchain/lang/gcc-core/build @@ -63,6 +63,7 @@ mkdir -p objdir-$1 && cd objdir-$1 --without-headers \ --with-newlib \ --disable-decimal-float \ + $GCC_OPTS \ --disable-nls make diff --git a/packages/toolchain/lang/gcc-final/build b/packages/toolchain/lang/gcc-final/build index e46f8b9845..bf65291812 100755 --- a/packages/toolchain/lang/gcc-final/build +++ b/packages/toolchain/lang/gcc-final/build @@ -62,6 +62,7 @@ mkdir -p objdir-$1 && cd objdir-$1 --enable-threads=posix \ --disable-libstdcxx-pch \ --enable-clocale=gnu \ + $GCC_OPTS \ --disable-nls make diff --git a/projects/ATV/options b/projects/ATV/options index 15b485ab3b..535017bdaf 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -64,6 +64,12 @@ # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312. # TARGET_CPU="cortex-a9" + + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/Fusion/options b/projects/Fusion/options index 0b5179ffdf..ab2cfdce14 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/Generic/options b/projects/Generic/options index 00408f2f05..3607cf7533 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index ecf6d31b71..553522c754 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/ION/options b/projects/ION/options index 6ae90d8b1a..b74bc5e63f 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/Intel/options b/projects/Intel/options index 38a662b915..a7bf7d593f 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: diff --git a/projects/RPi/options b/projects/RPi/options index 9da244a89c..ec4a5717b8 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -65,6 +65,11 @@ # TARGET_CPU="arm1176jzf-s" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: @@ -75,6 +80,8 @@ ;; esac + + # Build optimizations (size/normal/speed) OPTIMIZATIONS="speed" diff --git a/projects/Ultra/options b/projects/Ultra/options index 84f366077c..0184fd6513 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -65,6 +65,11 @@ # TARGET_CPU="cortex-a9" + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="softfp" + # TARGET_FPU: # This specifies what floating point hardware (or hardware emulation) is # available on the target. Permissible names are: