summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/distro/include/sane-toolchain-uclibc.inc47
-rw-r--r--conf/distro/include/uclibc-internal.inc1
-rw-r--r--conf/distro/include/uclibc.inc19
3 files changed, 67 insertions, 0 deletions
diff --git a/conf/distro/include/sane-toolchain-uclibc.inc b/conf/distro/include/sane-toolchain-uclibc.inc
new file mode 100644
index 0000000..b51cdaf
--- /dev/null
+++ b/conf/distro/include/sane-toolchain-uclibc.inc
@@ -0,0 +1,47 @@
+# 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 -pipe ${DEBUG_FLAGS}"
+BUILD_OPTIMIZATION += "-pipe"
+
+# -Os compiled root file system does not boot for powerpc, root cause it still at large
+# we use -O2 meanwhile
+FULL_OPTIMIZATION_powerpc = "-O2 -pipe ${DEBUG_FLAGS}"
+
+#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 ${DEBUG_FLAGS}"
+
+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"
+
+
diff --git a/conf/distro/include/uclibc-internal.inc b/conf/distro/include/uclibc-internal.inc
new file mode 100644
index 0000000..80e07d9
--- /dev/null
+++ b/conf/distro/include/uclibc-internal.inc
@@ -0,0 +1 @@
+require conf/distro/include/${LIBC}.inc
diff --git a/conf/distro/include/uclibc.inc b/conf/distro/include/uclibc.inc
new file mode 100644
index 0000000..200fac2
--- /dev/null
+++ b/conf/distro/include/uclibc.inc
@@ -0,0 +1,19 @@
+# Add uclibc overrides to the overrides.
+OVERRIDES =. "libc-uclibc:"
+
+# The things uclibc can provide. We default to wanting uclibc to provide them.
+PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
+PREFERRED_PROVIDER_virtual/libintl ?= "proxy-libintl"
+#fix some iconv issues, needs to be adjusted when doing uclibc builds
+PREFERRED_PROVIDER_virtual/libintl_avr32 = "proxy-libintl"
+PREFERRED_PROVIDER_virtual/libc = "uclibc"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "uclibc-initial"
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "uclibc"
+
+# libc settings
+DISTRO_FEATURES += "${@['', ' nls'][bb.data.getVar('ENABLE_BINARY_LOCALE_GENERATION', d, 1) == '1']}"
+MACHINE_FEATURES += "${@['', ' bx'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+# FIXME: We enable IPv4 per default to avoid alot of breakage.
+# FIXME: Figure out an acceptable way to negotiate either
+# FIXME: desired features or hard requirements, either top-down or bottom-up.
+DISTRO_FEATURES += " ipv4"