blob: 7c8290f715fb4912e012e59b041dd8e7abb84b3a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001When cross compiling a target gcc, target flags may be used on the host
2
3Configure identifies a number of warning flags (WARN_CFLAGS and
4WARN_CXXFLAGS) from the $CC value. The cross compiler may be different
5from the host compiler and may not support the same set of flags. This
6leads to problems such as:
7
8cc1plus: error: unrecognized command line option "-Wno-narrowing"
9cc1plus: error: unrecognized command line option "-Wno-overlength-strings"
10
11Work around this problem by removing the warning flags from the
12BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS.
13
14Upstream-Status: Pending
15
16Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
17
18Index: gcc-4.8.4/gcc/configure
19===================================================================
20--- gcc-4.8.4.orig/gcc/configure
21+++ gcc-4.8.4/gcc/configure
22@@ -17864,7 +17864,7 @@ else
23 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
24 lt_status=$lt_dlunknown
25 cat > conftest.$ac_ext <<_LT_EOF
26-#line 17853 "configure"
27+#line 17867 "configure"
28 #include "confdefs.h"
29
30 #if HAVE_DLFCN_H
31@@ -17970,7 +17970,7 @@ else
32 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
33 lt_status=$lt_dlunknown
34 cat > conftest.$ac_ext <<_LT_EOF
35-#line 17959 "configure"
36+#line 17973 "configure"
37 #include "confdefs.h"
38
39 #if HAVE_DLFCN_H
40@@ -26918,18 +26918,15 @@ $as_echo "#define TARGET_LIBC_PROVIDES_S
41 fi
42
43 # Test for <sys/sdt.h> on the target.
44-
45-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
46-$as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
47-have_sys_sdt_h=no
48+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
49+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
50+#have_sys_sdt_h=no
51 #if test -f $target_header_dir/sys/sdt.h; then
52 # have_sys_sdt_h=yes
53-#
54-#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
55-#
56+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
57+# [Define if your target C library provides sys/sdt.h])
58 #fi
59-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
60-$as_echo "$have_sys_sdt_h" >&6; }
61+#AC_MSG_RESULT($have_sys_sdt_h)
62
63 # Check if TFmode long double should be used by default or not.
64 # Some glibc targets used DFmode long double, but with glibc 2.4