angstrom-meta: Prune the global optimization flags.

* With gcc 4.5 most of the flags are redundant and
  we levarage oe-core flag settings as much as we
  can

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Khem Raj
2011-03-23 11:20:43 -07:00
committed by Koen Kooi
parent 745cec04fa
commit 228367d7f4
10 changed files with 6 additions and 132 deletions

View File

@@ -14,14 +14,7 @@ TARGET_OS .= "${@['','-gnuspe'][bb.data.getVar('BASE_PACKAGE_ARCH',d,1) in ['ppc
# perl has some problems, see http://bugs.openembedded.net/show_bug.cgi?id=1616
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2"
FULL_OPTIMIZATION_pn-eglibc_arm = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb3"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
BUILD_OPTIMIZATION = "-O2 -g"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_sparc = "-O2"
FULL_OPTIMIZATION_pn-perl = "-O1 -g"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"

View File

@@ -11,16 +11,11 @@ TARGET_OS .= "${@['','-gnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'a
# perl has some problems, see http://bugs.openembedded.net/show_bug.cgi?id=1616
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
FULL_OPTIMIZATION_ep9312 = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
FULL_OPTIMIZATION_pn-perl = "-O1"
FULL_OPTIMIZATION_ep9312 = "-O -fno-signed-zeros -pipe ${DEBUG_FLAGS}"
# This is only used for -native packages
BUILD_OPTIMIZATION = "-O2 -g"
BUILD_OPTIMIZATION_pn-perl-native = "-O1 -g"
BUILD_OPTIMIZATION_pn-perl-native = "-O1"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"

View File

@@ -12,9 +12,6 @@ USE_NLS_gcc-cross = "no"
TARGET_OS_UC = "linux${@['-uclibc','-uclibceabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}"
TARGET_OS = "${@['${TARGET_OS_UC}', 'uclinux-uclibc'][bb.data.getVar('TARGET_ARCH',d) in ['bfin']]}"
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2"
BUILD_OPTIMIZATION = "-O2 -g"
#Gcc will die with 'internal consistency error when using the above optimizations
#with gcc-4.2.1-atmel.1.0.3 (and probably most other avr32 gcc ports).
#However, some packages require optimizations to compile (e.g. libmad).
@@ -23,7 +20,7 @@ BUILD_OPTIMIZATION = "-O2 -g"
#it was removed while debugging an issue that ultimately turned out to be due
#to the ICE fixed by gcc-pr32889.patch. It needs to be tested again.
#Note that this testing was done without the gcc-pr32889.patch.
FULL_OPTIMIZATION_avr32 = "-Os -fomit-frame-pointer"
FULL_OPTIMIZATION_avr32 = "-Os -pipe ${DEBUG_FLAGS}"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]}"

View File

@@ -8,9 +8,6 @@ USE_NLS_gcc-cross = "no"
TARGET_OS_UC = "uclinux${@['-uclibc','-uclibceabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb']]}"
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2"
BUILD_OPTIMIZATION = "-O2"
#Gcc will die with 'internal consistency error when using the above optimizations
FULL_OPTIMIZATION_avr32 = ""
BUILD_OPTIMIZATION_avr32 = ""

View File

@@ -48,7 +48,7 @@ PREFERRED_PROVIDER_linux-libc-headers-nativesdk = "linux-libc-headers-nativesdk"
require conf/distro/include/angstrom-${LIBC}.inc
# Set some java bits
require conf/distro/include/sane-toolchain-java.inc
require conf/distro/include/angstrom-java.inc
require conf/distro/include/angstrom-jalimo.conf
# ARM920T and up can use thumb mode to decrease binary size at the expense of speed

View File

@@ -1,25 +0,0 @@
# Originally brought to you by the Angstrom Distribution
# eglibc:
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
# Work-around for alignment traps when eglibc-2.12 is built with gcc-4.5*
FULL_OPTIMIZATION_pn-eglibc_arm = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -ggdb3"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
# JaMa: I promise to report bug upstream, but as it can take a while to fix it, I'll switch to -O2 here
# Tested with gcc-4.4.2 and gcc-4.4.3 on armv4t and armv5te and it fails with -Os, with gcc-4.3.3 it works OK with -Os
# Here is testcase, but you have to rebuild whole libqtxml to test it
# http://lists.shr-project.org/pipermail/shr-devel/2010-February/002169.html
FULL_OPTIMIZATION_pn-qt4-x11-free = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
# This I've seen only on armv4t, it segfaults when called from pisi, but whole test unit suite can pass
FULL_OPTIMIZATION_pn-libsyncml = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_sparc = "-O2"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"
CXXFLAGS += "-fvisibility-inlines-hidden"

View File

@@ -1,22 +0,0 @@
# Originally brought to you by the Angstrom Distribution
# glibc:
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
# perl has some problems, see http://bugs.openembedded.net/show_bug.cgi?id=1616
# [23:00] oxo: glibc (any version) on sparc does not like (repeat me) "-Os"
FULL_OPTIMIZATION = "-fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2"
FULL_OPTIMIZATION_pn-perl = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O1"
FULL_OPTIMIZATION_pn-glibc = "-fexpensive-optimizations -fomit-frame-pointer -O2"
FULL_OPTIMIZATION_sparc = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
BUILD_OPTIMIZATION_pn-perl = "-O1"
BUILD_OPTIMIZATION_pn-glibc = "-O2"
BUILD_OPTIMIZATION_sparc = "-O2"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el']]}"
CXXFLAGS += "-fvisibility-inlines-hidden"

View File

@@ -1,41 +0,0 @@
# Originally brought to you by the Angstrom Distribution
# uclibc:
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "uclibc"
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
PREFERRED_PROVIDER_virtual/libc = "uclibc"
PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers"
PREFERRED_PROVIDER_virtual/libintl = "proxy-libintl"
PREFERRED_PROVIDER_virtual/libiconv = "libiconv"
USE_NLS ?= "no"
USE_NLS_glib-2.0-native = "yes"
USE_NLS_gcc-cross = "no"
PREFERRED_VERSION_uclibc ?= "${PREFERRED_UCLIBC_VERSION}"
PREFERRED_VERSION_uclibc-initial ?= "${PREFERRED_UCLIBC_VERSION}"
PREFERRED_VERSION_uclibc-cross ?= "${PREFERRED_UCLIBC_VERSION}"
PREFERRED_VERSION_uclibc-cross-sdk ?= "${PREFERRED_UCLIBC_VERSION}"
PREFERRED_VERSION_uclibc-cross-initial ?= "${PREFERRED_UCLIBC_VERSION}"
PREFERRED_VERSION_uclibc-cross-intermediate ?= "${PREFERRED_UCLIBC_VERSION}"
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
#Gcc will die with 'internal consistency error when using the above optimizations
#with gcc-4.2.1-atmel.1.0.3 (and probably most other avr32 gcc ports).
#However, some packages require optimizations to compile (e.g. libmad).
#It appears the guilty optimization is "-frename-registers", leaving that one
#out allows the build to proceed normally. -fexpensive-optimizations may be OK,
#it was removed while debugging an issue that ultimately turned out to be due
#to the ICE fixed by gcc-pr32889.patch. It needs to be tested again.
#Note that this testing was done without the gcc-pr32889.patch.
FULL_OPTIMIZATION_avr32 = "-Os -fomit-frame-pointer"
TARGET_LINK_HASH_STYLE = "${@['-Wl,--hash-style=gnu',''][bb.data.getVar('TARGET_ARCH',d,1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]}"
CXXFLAGS += "-fvisibility-inlines-hidden"

View File

@@ -1,20 +0,0 @@
# Originally brought to you by the Angstrom Distribution
# uclibc:
USE_NLS ?= "no"
USE_NLS_glib-2.0 = "yes"
USE_NLS_glib-2.0-native = "yes"
USE_NLS_gcc-cross = "no"
#mess with compiler flags to use -Os instead of -O2
#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
BUILD_OPTIMIZATION = "-Os"
#Gcc will die with 'internal consistency error when using the above optimizations
FULL_OPTIMIZATION_avr32 = ""
BUILD_OPTIMIZATION_avr32 = ""
CXXFLAGS += "-fvisibility-inlines-hidden"