This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Two build != host fixes


Hi Alan,


just for the records, this is how my cross-build fails:

../gcc-4.9-20131215/configure --prefix=/home/ed/gnu/x/arm-linux-gnueabihf-cross --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard



...
make[2]: Entering directory `/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/gcc'
g++ -c -DIN_GCC     -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.9-20131215/gcc -I../../gcc-4.9-20131215/gcc/build -I../../gcc-4.9-20131215/gcc/../include -I../../gcc-4.9-20131215/gcc/../libcpp/include -I/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/./gmp -I/home/ed/gnu/x/gcc-4.9-20131215/gmp -I/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/./mpfr -I/home/ed/gnu/x/gcc-4.9-20131215/mpfr -I/home/ed/gnu/x/gcc-4.9-20131215/mpc/src  -I../../gcc-4.9-20131215/gcc/../libdecnumber -I../../gcc-4.9-20131215/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-4.9-20131215/gcc/../libbacktrace    \
        -o build/genmddeps.o ../../gcc-4.9-20131215/gcc/genmddeps.c
In file included from ./bconfig.h:3:0,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:18:
./auto-build.h:2037:16: error: declaration does not declare anything [-fpermissive]
 #define rlim_t long
                ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:450:23: error: conflicting declaration of C function 'void* sbrk(int)'
 extern void *sbrk (int);
                       ^
In file included from ../../gcc-4.9-20131215/gcc/system.h:262:0,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:
/usr/include/unistd.h:1067:14: note: previous declaration 'void* sbrk(intptr_t)'
 extern void *sbrk (intptr_t __delta) __THROW;
              ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:454:48: error: ambiguating new declaration of 'char* strstr(const char*, const char*)'
 extern char *strstr (const char *, const char *);
                                                ^
In file included from /home/ed/gnu/install/include/c++/4.9.0/cstring:42:0,
                 from ../../gcc-4.9-20131215/gcc/system.h:205,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:
/usr/include/string.h:323:22: note: old declaration 'const char* strstr(const char*, const char*)'
 extern __const char *strstr (__const char *__haystack,
                      ^
In file included from /usr/include/features.h:357:0,
                 from /usr/include/stdio.h:28,
                 from ../../gcc-4.9-20131215/gcc/system.h:40,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:
/usr/include/malloc.h:76:32: error: declaration of 'void free(void*) throw ()' has a different exception specifier
 extern void free (void *__ptr) __THROW;
                                ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:426:13: error: from previous declaration 'void free(void*)'
 extern void free (void *);
             ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:506:34: error: conflicting declaration of C function 'const char* strsignal(int)'
 extern const char *strsignal (int);
                                  ^
In file included from /home/ed/gnu/install/include/c++/4.9.0/cstring:42:0,
                 from ../../gcc-4.9-20131215/gcc/system.h:205,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:
/usr/include/string.h:566:14: note: previous declaration 'char* strsignal(int)'
 extern char *strsignal (int __sig) __THROW;
              ^
In file included from ./bconfig.h:5:0,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:18:
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:308:64: error: ambiguating new declaration of 'char* basename(const char*)'
 #  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
                                                                ^
../../gcc-4.9-20131215/gcc/../include/libiberty.h:110:64: note: in expansion of macro 'ATTRIBUTE_NONNULL'
 extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
                                                                ^
In file included from /home/ed/gnu/install/include/c++/4.9.0/cstring:42:0,
                 from ../../gcc-4.9-20131215/gcc/system.h:205,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:
/usr/include/string.h:603:28: note: old declaration 'const char* basename(const char*)'
 extern "C++" __const char *basename (__const char *__filename)
                            ^
In file included from ./bconfig.h:5:0,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:18:
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:308:64: error: declaration of 'int snprintf(char*, size_t, const char*, ...)' has a different exception specifier
 #  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
                                                                ^
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:337:80: note: in expansion of macro 'ATTRIBUTE_NONNULL'
 #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
                                                                                ^
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:340:28: note: in expansion of macro 'ATTRIBUTE_PRINTF'
 #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
                            ^
../../gcc-4.9-20131215/gcc/../include/libiberty.h:628:57: note: in expansion of macro 'ATTRIBUTE_PRINTF_3'
 extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
                                                         ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:533:12: error: from previous declaration 'int snprintf(char*, size_t, const char*, ...) throw ()'
 extern int snprintf (char *, size_t, const char *, ...);
            ^
In file included from ./bconfig.h:5:0,
                 from ../../gcc-4.9-20131215/gcc/genmddeps.c:18:
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:308:64: error: declaration of 'int vsnprintf(char*, size_t, const char*, __va_list_tag*)' has a different exception specifier
 #  define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
                                                                ^
../../gcc-4.9-20131215/gcc/../include/ansidecl.h:337:80: note: in expansion of macro 'ATTRIBUTE_NONNULL'
 #define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
                                                                                ^
../../gcc-4.9-20131215/gcc/../include/libiberty.h:633:62: note: in expansion of macro 'ATTRIBUTE_PRINTF'
 extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0);
                                                              ^
In file included from ../../gcc-4.9-20131215/gcc/genmddeps.c:19:0:
../../gcc-4.9-20131215/gcc/system.h:537:12: error: from previous declaration 'int vsnprintf(char*, size_t, const char*, __va_list_tag*) throw ()'
 extern int vsnprintf (char *, size_t, const char *, va_list);
            ^
make[2]: *** [build/genmddeps.o] Error 1
make[2]: Leaving directory `/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/ed/gnu/x/gcc-build-arm-linux-gnueabihf-cross'
make: *** [all] Error 2



the reason for this is overwriting GMPINC for the auto-build generation, because
many test scripts include <gmp.h> which fails now completely (it is not installed,
I have it in-tree). But as you can see the actual invocation of the Build-compiler
has still GMPINC set.




diff -u gcc-build-arm-linux-gnueabihf-cross/gcc/auto-build.h x/gcc-build-arm-linux-gnueabihf-cross/gcc/auto-build.h 
--- gcc-build-arm-linux-gnueabihf-cross/gcc/auto-build.h    2013-12-16 13:55:19.008464424 +0100
+++ x/gcc-build-arm-linux-gnueabihf-cross/gcc/auto-build.h    2013-12-17 13:00:21.342234317 +0100
@@ -572,7 +572,7 @@
 
 /* Define if <time.h> defines clock_t. */
 #ifndef USED_FOR_TARGET
-#define HAVE_CLOCK_T 1
+/* #undef HAVE_CLOCK_T */
 #endif
 
 
@@ -585,109 +585,109 @@
 /* Define to 1 if we found a declaration for 'abort', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ABORT 1
+#define HAVE_DECL_ABORT 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'asprintf', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ASPRINTF 1
+#define HAVE_DECL_ASPRINTF 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ATOF 1
+#define HAVE_DECL_ATOF 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'atol', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ATOL 1
+#define HAVE_DECL_ATOL 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'basename', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_BASENAME 1
+#define HAVE_DECL_BASENAME 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'calloc', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_CALLOC 1
+#define HAVE_DECL_CALLOC 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'clearerr_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_CLEARERR_UNLOCKED 1
+#define HAVE_DECL_CLEARERR_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'clock', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_CLOCK 1
+#define HAVE_DECL_CLOCK 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'errno', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ERRNO 1
+#define HAVE_DECL_ERRNO 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'feof_unlocked', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FEOF_UNLOCKED 1
+#define HAVE_DECL_FEOF_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'ferror_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FERROR_UNLOCKED 1
+#define HAVE_DECL_FERROR_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fflush_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FFLUSH_UNLOCKED 1
+#define HAVE_DECL_FFLUSH_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'ffs', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FFS 1
+#define HAVE_DECL_FFS 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fgetc_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FGETC_UNLOCKED 1
+#define HAVE_DECL_FGETC_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fgets_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FGETS_UNLOCKED 1
+#define HAVE_DECL_FGETS_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fileno_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FILENO_UNLOCKED 1
+#define HAVE_DECL_FILENO_UNLOCKED 0
 #endif
 
 
@@ -701,62 +701,62 @@
 /* Define to 1 if we found a declaration for 'fputc_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FPUTC_UNLOCKED 1
+#define HAVE_DECL_FPUTC_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fputs_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FPUTS_UNLOCKED 1
+#define HAVE_DECL_FPUTS_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fread_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FREAD_UNLOCKED 1
+#define HAVE_DECL_FREAD_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'free', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FREE 1
+#define HAVE_DECL_FREE 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'fwrite_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FWRITE_UNLOCKED 1
+#define HAVE_DECL_FWRITE_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getchar_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETCHAR_UNLOCKED 1
+#define HAVE_DECL_GETCHAR_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETCWD 1
+#define HAVE_DECL_GETCWD 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getc_unlocked', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETC_UNLOCKED 1
+#define HAVE_DECL_GETC_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getenv', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETENV 1
+#define HAVE_DECL_GETENV 0
 #endif
 
 
@@ -770,28 +770,28 @@
 /* Define to 1 if we found a declaration for 'getpagesize', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETPAGESIZE 1
+#define HAVE_DECL_GETPAGESIZE 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getrlimit', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETRLIMIT 1
+#define HAVE_DECL_GETRLIMIT 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getrusage', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETRUSAGE 1
+#define HAVE_DECL_GETRUSAGE 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getwd', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETWD 1
+#define HAVE_DECL_GETWD 0
 #endif
 
 
@@ -805,111 +805,111 @@
 /* Define to 1 if we found a declaration for 'madvise', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_MADVISE 1
+#define HAVE_DECL_MADVISE 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'malloc', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_MALLOC 1
+#define HAVE_DECL_MALLOC 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'putchar_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_PUTCHAR_UNLOCKED 1
+#define HAVE_DECL_PUTCHAR_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'putc_unlocked', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_PUTC_UNLOCKED 1
+#define HAVE_DECL_PUTC_UNLOCKED 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'realloc', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_REALLOC 1
+#define HAVE_DECL_REALLOC 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'sbrk', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_SBRK 1
+#define HAVE_DECL_SBRK 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'setrlimit', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_SETRLIMIT 1
+#define HAVE_DECL_SETRLIMIT 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'sigaltstack', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_SIGALTSTACK 1
+#define HAVE_DECL_SIGALTSTACK 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'snprintf', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_SNPRINTF 1
+#define HAVE_DECL_SNPRINTF 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'stpcpy', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_STPCPY 1
+#define HAVE_DECL_STPCPY 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'strsignal', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_STRSIGNAL 1
+#define HAVE_DECL_STRSIGNAL 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'strstr', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_STRSTR 1
+#define HAVE_DECL_STRSTR 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'strverscmp', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_STRVERSCMP 1
+#define HAVE_DECL_STRVERSCMP 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'times', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_TIMES 1
+#define HAVE_DECL_TIMES 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'vasprintf', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_VASPRINTF 1
+#define HAVE_DECL_VASPRINTF 0
 #endif
 
 
 /* Define to 1 if we found a declaration for 'vsnprintf', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_VSNPRINTF 1
+#define HAVE_DECL_VSNPRINTF 0
 #endif
 
 
@@ -1474,7 +1474,7 @@
 
 /* Define if <sys/times.h> defines struct tms. */
 #ifndef USED_FOR_TARGET
-#define HAVE_STRUCT_TMS 1
+/* #undef HAVE_STRUCT_TMS */
 #endif
 
 
@@ -2034,7 +2034,7 @@
 
 /* Define to `long' if <sys/resource.h> doesn't define. */
 #ifndef USED_FOR_TARGET
-/* #undef rlim_t */
+#define rlim_t long
 #endif



Regards
Bernd. 		 	   		  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]