https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88715

            Bug ID: 88715
           Summary: Cross Compile on Debian Linux to create a uClibc tool
                    chain GCC fails to compile
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tomsies at mighty dot co.za
  Target Milestone: ---

System is Debian Linux (Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux)

I have compiled uClibc-ng-1.0.31 using linux headers LinuxHeaders-2.6.32.25
This is installed in /opt/uCx

I try to build a cross compiler targeting this libc as follows

../gnuSource/gcc-8.2.0/configure --prefix=/opt/uCx --with-sysroot=/opt/uCx
--with-pkgversion=DDT --disable-bootstrap --target=i686-uClibc-linux
--enable-shared=no --disable-lto-plugin --disable-libsanitizer
--disable-boehm-gc --disable-libmudflap --disable-libgcj
--enable-languages=c,c++,fortran,lto,objc,obj-c++  --enable-libstdcxx-time
--enable-libstdcxx-threads --with-host-libstdcxx='-static -lstdc++ -lm'
--with-boot-ldflags='-static-libstdc++ -static-libgcc'

As soon as the compile starts to build i686-uClibc-linux objects configure
fails as below

configure:3687: /src/abuild/./gcc/xgcc -B/src/abuild/./gcc/
-B/opt/uCx/i686-uClibc-linux/bin/ -B/opt/uCx/i686-uClibc-linux/lib/ -isystem
/opt/uCx/i686-uClibc-linux/include -isystem
/opt/uCx/i686-uClibc-linux/sys-include    -c -g -O2  conftest.c >&5
/src/abuild/./gcc/as: 106: exec: --32: not found
configure:3691: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3705: error: in `/src/abuild/i686-uClibc-linux/libgcc':
configure:3708: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.


What the issue seems to be is that the x-compile in GCC has built a script to
replace the as command using exec. This script is using exec without proper
quoting so exec is trying to exec --32 as well as as

/src/abuild/./gcc/as --32 -o conftest.o /tmp/ccE1mSpa.s

Reply via email to