This is the mail archive of the gcc-bugs@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]

[Bug other/80203] New: libiberty fails to compile regex.c correctly when gcc is configured --with-sysroot


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

            Bug ID: 80203
           Summary: libiberty fails to compile regex.c correctly when gcc
                    is configured --with-sysroot
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jeremyhu at macports dot org
  Target Milestone: ---

During a build of gcc6, libiberty fails to compile because -isysroot is not
passed to the compiler.  gcc was configured with
--with-sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk",
and this is passed elsewhere, but not when building regex.c

 /opt/local/bin/clang-mp-3.9 -arch x86_64 -c -DHAVE_CONFIG_H -pipe -Os
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -I.
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_lang_gcc6/libgcc/work/gcc-6.3.0/libiberty/../include
 -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
-D_GNU_SOURCE 
/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_lang_gcc6/libgcc/work/gcc-6.3.0/libiberty/physmem.c

...

if [ x"-fno-common" != x ]; then \
          /opt/local/bin/clang-mp-3.9 -arch x86_64 -c -DHAVE_CONFIG_H -g   -I.
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_lang_gcc6/libgcc/work/gcc-6.3.0/libiberty/../include
 -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic 
-D_GNU_SOURCE -fno-common
/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_lang_gcc6/libgcc/work/gcc-6.3.0/libiberty/regex.c
-o pic/regex.o; \
        else true; fi
/opt/local/var/macports/build/_Users_jeremy_src_macports_macports-ports_lang_gcc6/libgcc/work/gcc-6.3.0/libiberty/regex.c:52:12:
fatal error: 'sys/types.h' file not found
#  include <sys/types.h>
           ^
1 error generated.

gcc was configured with:

--prefix=/opt/local --build=x86_64-apple-darwin16
--enable-languages=c,c++,objc,obj-c++,lto,fortran
--includedir=/opt/local/include/gcc6 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-6
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-6 --with-gxx-include-dir=/opt/local/include/gcc6/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--libdir=/opt/local/lib/libgcc --with-pkgversion="MacPorts gcc6 6.3.0_0"
--with-sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk"

Note that we're not using --with-build-sysroot because of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885

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