]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Clean up configure_prepend and fix for mingw
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 30 May 2014 12:32:54 +0000 (13:32 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jun 2014 13:51:24 +0000 (14:51 +0100)
The do_configure_prepend was duplicated in gcc-4.X.inc and
gcc-configure-common.inc leading to confusion when reading the resulting
do_configure task where the file was processed twice.

The only difference was the removal of the include line for gcc 4.8/4.9.

On mingw were were seeing two issues, firstly that the if statements meant
the values we wanted weren't being set, the second that the include
paths were still wrong as there was no header path set.

To fix the first issue, the #ifdef conditionals were removed, we want
to set these things unconditionally. The second issue is addressed by
setting the NATIVE_SYSTEM_HEADER_DIR variable here (it was already
set in t-oe).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-4.8.inc
meta/recipes-devtools/gcc/gcc-configure-common.inc

index c32060034e7a3486afe29a0364e6b402a2a316bb..f7d7bec6b010dbe71199306c2761c0ab352f23d6 100644 (file)
@@ -121,21 +121,4 @@ EXTRA_OECONF_PATHS = " \
                       --with-sysroot=${STAGING_DIR_TARGET} \ 
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
-do_configure_prepend () {
-        # teach gcc to find correct target includedir when checking libc ssp support
-        mkdir -p ${B}/gcc
-        echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
-        cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
-        cat >>${B}/gcc/defaults.h.new <<_EOF
-#ifndef STANDARD_STARTFILE_PREFIX_1
-#define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
-#endif
-#ifndef STANDARD_STARTFILE_PREFIX_2
-#define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
-#endif
-#define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
-#endif /* ! GCC_DEFAULTS_H */
-_EOF
-        mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
-}
 
index dc44cc9f084ddb1ef77764a1dde6e4bef8b25ec9..95337381999d1e54d882eb9c57880ec5503188ef 100644 (file)
@@ -83,15 +83,9 @@ do_configure_prepend () {
        echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
        cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new
        cat >>${B}/gcc/defaults.h.new <<_EOF
-#ifndef STANDARD_INCLUDE_DIR
-#define STANDARD_INCLUDE_DIR "${SYSTEMHEADERS}"
-#endif
-#ifndef STANDARD_STARTFILE_PREFIX_1
+#define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}"
 #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}"
-#endif
-#ifndef STANDARD_STARTFILE_PREFIX_2
 #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}"
-#endif
 #define SYSTEMLIBS_DIR "${SYSTEMLIBS}"
 #endif /* ! GCC_DEFAULTS_H */
 _EOF