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 c/65267] New: While compiling gcc/errors.c, invalid link options passed to Solaris Linker


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

            Bug ID: 65267
           Summary: While compiling gcc/errors.c, invalid link options
                    passed to Solaris Linker
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rj7252 at att dot com

I am building gcc 4.9.2 on Solaris 10 with the latest patches using Solaris
Studio 12

gfp-ip@gfpmt5pcs10:pts1:/appl/gfpip/local_build
$ pkginfo -l SPRO-12-3-studio-ide
   PKGINST:  SPRO-12-3-studio-ide
      NAME:  Integrated Development Environment for C, C++, and Fortran
  CATEGORY:  application
      ARCH:  sparc
   VERSION:  12.3,REV=1
   BASEDIR:  /opt
    VENDOR:  Oracle Corporation
      DESC:  Integrated Development Environment for C, C++, and Fortran.
    PSTAMP:  buba20111116071220
  INSTDATE:  Oct 17 2014 19:38
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:     5076 installed pathnames
                  20 shared pathnames
                 426 directories
                 146 executables
              358944 blocks used (approx)

I have followed the steps listed to build gcc:
/appl/local_build/src/gnu_$ gzip -d </appl/local_build/tar/gnu/gcc-4.9.2.tar.gz
| /appl/local-201501ss/bin/tar -xvf -
/appl/local_build/src/gnu_$ cd gcc-4.9.2
/appl/local_build/src/gnu/gcc-4.9.2_$ contrib/download_prerequisites


My install target is /appl/local-201403/gcc4
I have these environment variables set:
CCASFLAGS=' -I/appl/local-201503/include '
CONFIG_SHELL=/bin/bash
CPPFLAGS='-I/appl/local-201503/include -I/opt/solarisstudio12.3/include '
CC=cc
CXX=CC
CXXFLAGS=' -I/appl/local-201503/include -I/opt/solarisstudio12.3/include '
FCFLAGS=' -I/appl/local-201503/include -I/opt/solarisstudio12.3/include '
FFLAGS=' -I/appl/local-201503/include -I/opt/solarisstudio12.3/include '
LDFLAGS='-R/appl/local-201503/lib -L/appl/local-201503/lib'
MAKE=make

PATH=/appl/local-201503/bin:/appl/local-201503/sbin:/appl/local-201501ss/bin:/appl/perl5/bin:/opt/solarisstudio12.3/bin:/opt/solarisstudio12.3/bin:/usr/ccs/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/sbin:/usr/bin:/usr/ucb:/usr/localcw/bin:/usr/localcw/sbin:/usr/openwin/bin

PKG_CONFIG_PATH=/appl/local-201503/lib/pkgconfig

These commands are in the PATH:
/usr/ccs/bin/ar
/usr/ccs/bin/as
/appl/gfpip/local-201501ss/bin/awk
/appl/gfpip/local-201501ss/bin/bison
/appl/gfpip/local-201501ss/bin/cmp
/appl/gfpip/local-201501ss/bin/diff
/appl/gfpip/local-201501ss/bin/flex
/appl/gfpip/local-201501ss/bin/gawk
/appl/gfpip/local-201501ss/bin/gettext
/appl/gfpip/local-201501ss/bin/grep
/appl/gfpip/local-201501ss/bin/gzip
/usr/ccs/bin/ld
/appl/gfpip/local-201501ss/bin/libtool
/appl/gfpip/local-201501ss/bin/libtoolize
/appl/gfpip/local-201501ss/bin/m4
/appl/gfpip/local-201501ss/bin/make
/appl/gfpip/local-201501ss/bin/runtest
/appl/gfpip/local-201501ss/bin/sed
/appl/gfpip/local-201501ss/bin/size
/appl/gfpip/local-201501ss/bin/sort
/appl/gfpip/local-201501ss/bin/tar
/appl/gfpip/local-201501ss/bin/xz
/appl/gfpip/local-201501ss/bin/yacc


Here is the configure command:
+ /bin/bash /appl/gfpip/local_build/src/gnu/gcc-4.9.2/configure \
    --prefix=/appl/local-201502/gcc4 \
    --libdir=/appl/local-201503/lib \
    --build=sparc-sun-solaris2.10

checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... /appl/gfpip/local-201501ss/bin/install
-c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output...
/appl/gfpip/local-201501ss/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... no
checking for libitm support... yes
checking for libsanitizer support... no
checking for libvtv support... no
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether CC accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for objdir... .libs
configure: WARNING: using in-tree ISL, disabling version check
configure: WARNING: using in-tree CLooG, disabling version check
The following languages will be built: c,c++,fortran,java,lto,objc
*** This configuration is not supported in the following subdirectories:
     target-libcilkrts target-libsanitizer target-libvtv gnattools
target-libada target-libgo target-libbacktrace
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG...
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... gm4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... runtest
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... no
checking for objdump... no
checking for readelf... no
checking for cc... cc
checking for c++... no
checking for g++... no
checking for cxx... no
checking for gxx... no
checking for gcc... no
checking for gcj... no
checking for gfortran... no
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... no
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... no
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... just compiled
checking where to find the target gfortran... just compiled
checking where to find the target gccgo... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile


Make runs for some time and then this happens:
gmp seems to build fine
intl seems to build find
mpfr seems to build fine
mpc seems to build fine
isl seems to build fine
cloog seems to build fine
libiberty seems to build fine
fixincludes seems to build fine
zlib seems to build fine
libbacktrace seems to build fine
libcpp seems to build fine
libdecnumber seems to build fine

Then this happens:

make[3]: Entering directory
`/appl/archives/local_build/build-gcc/gcc-4.9.2/gcc'
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/bash /appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/mkconfig.sh config.h
TARGET_CPU_DEFAULT="TARGET_CPU_v9" \
HEADERS="options.h insn-constants.h config/sparc/biarch64.h
config/vxworks-dummy.h config/sparc/sparc.h config/dbxelf.h con
fig/elfos.h config/sparc/sysv4.h config/sol2.h config/sparc/sol2.h
config/sol2-10.h config/sol2-bi.h config/sparc/tso.h con
fig/initfini-array.h defaults.h" DEFINES="LIBC_GLIBC=1 LIBC_UCLIBC=2
LIBC_BIONIC=3" \
/bin/bash /appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/mkconfig.sh tm.h
TARGET_CPU_DEFAULT="" \
HEADERS="config/sparc/sparc-protos.h config/sol2-protos.h tm-preds.h"
DEFINES="" \
/bin/bash /appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/mkconfig.sh tm_p.h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/bash /appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/mkconfig.sh bconfig.h
CC -c   -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
 -I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/build -I/appl/gfpip/local_
build/src/gnu/gcc-4.9.2/gcc/../include -I./../intl
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/../libcpp/include -I/app
l/local-201503/include -I/opt/solarisstudio12.3/include  \
        -o build/genmddeps.o
/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/genmddeps.c
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fasynchronous-unwind-tables passed to ld, if ld is
invoked, ignored otherwise
CC -c   -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
 -I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/build -I/appl/gfpip/local_
build/src/gnu/gcc-4.9.2/gcc/../include -I./../intl
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/../libcpp/include -I/app
l/local-201503/include -I/opt/solarisstudio12.3/include  \
        -o build/read-md.o
/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fasynchronous-unwind-tables passed to ld, if ld is
invoked, ignored otherwise
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1053: Warning
(Anachronism): Formal argument 4 of type exte
rn "C" void*(*)(long) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void*(*)(long).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1053: Warning
(Anachronism): Formal argument 5 of type exte
rn "C" void(*)(void*) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void(*)(void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1054: Warning
(Anachronism): Formal argument 2 of type exte
rn "C" unsigned(*)(const void*) in call to htab_create(unsigned, extern "C"
unsigned(*)(const void*), extern "C" int(*)(con
st void*,const void*), extern "C" void(*)(void*)) is being passed
unsigned(*)(const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1054: Warning
(Anachronism): Formal argument 3 of type exte
rn "C" int(*)(const void*,const void*) in call to htab_create(unsigned, extern
"C" unsigned(*)(const void*), extern "C" int
(*)(const void*,const void*), extern "C" void(*)(void*)) is being passed
int(*)(const void*,const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1055: Warning
(Anachronism): Formal argument 4 of type exte
rn "C" void*(*)(long) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void*(*)(long).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1055: Warning
(Anachronism): Formal argument 5 of type exte
rn "C" void(*)(void*) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void(*)(void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1056: Warning
(Anachronism): Formal argument 2 of type exte
rn "C" unsigned(*)(const void*) in call to htab_create(unsigned, extern "C"
unsigned(*)(const void*), extern "C" int(*)(con
st void*,const void*), extern "C" void(*)(void*)) is being passed
unsigned(*)(const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1056: Warning
(Anachronism): Formal argument 3 of type exte
rn "C" int(*)(const void*,const void*) in call to htab_create(unsigned, extern
"C" unsigned(*)(const void*), extern "C" int
(*)(const void*,const void*), extern "C" void(*)(void*)) is being passed
int(*)(const void*,const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1057: Warning
(Anachronism): Formal argument 4 of type exte
rn "C" void*(*)(long) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void*(*)(long).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1057: Warning
(Anachronism): Formal argument 5 of type exte
rn "C" void(*)(void*) in call to _obstack_begin(obstack*, int, int, extern "C"
void*(*)(long), extern "C" void(*)(void*)) i
s being passed void(*)(void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1058: Warning
(Anachronism): Formal argument 2 of type exte
rn "C" unsigned(*)(const void*) in call to htab_create(unsigned, extern "C"
unsigned(*)(const void*), extern "C" int(*)(con
st void*,const void*), extern "C" void(*)(void*)) is being passed
unsigned(*)(const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1059: Warning
(Anachronism): Formal argument 3 of type exte
rn "C" int(*)(const void*,const void*) in call to htab_create(unsigned, extern
"C" unsigned(*)(const void*), extern "C" int
(*)(const void*,const void*), extern "C" void(*)(void*)) is being passed
int(*)(const void*,const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1060: Warning
(Anachronism): Formal argument 2 of type exte
rn "C" unsigned(*)(const void*) in call to htab_create(unsigned, extern "C"
unsigned(*)(const void*), extern "C" int(*)(con
st void*,const void*), extern "C" void(*)(void*)) is being passed
unsigned(*)(const void*).
"/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/read-md.c", line 1061: Warning
(Anachronism): Formal argument 3 of type exte
rn "C" int(*)(const void*,const void*) in call to htab_create(unsigned, extern
"C" unsigned(*)(const void*), extern "C" int
(*)(const void*,const void*), extern "C" void(*)(void*)) is being passed
int(*)(const void*,const void*).
14 Warning(s) detected.
CC -c   -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
 -I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/build -I/appl/gfpip/local_
build/src/gnu/gcc-4.9.2/gcc/../include -I./../intl
-I/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/../libcpp/include -I/app
l/local-201503/include -I/opt/solarisstudio12.3/include  \
        -o build/errors.o
/appl/gfpip/local_build/src/gnu/gcc-4.9.2/gcc/errors.c
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fasynchronous-unwind-tables passed to ld, if ld is
invoked, ignored otherwise
CC   -g -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables 
-DHAVE_CONFIG_H -DGENERATOR_FILE -R/appl/local-
201503/lib -L/appl/local-201503/lib -o build/genmddeps \
    build/genmddeps.o build/read-md.o build/errors.o
../build-sparc-sun-solaris2.10/libiberty/libiberty.a
CC: Warning: Option -fno-exceptions passed to ld, if ld is invoked, ignored
otherwise
CC: Warning: Option -fno-rtti passed to ld, if ld is invoked, ignored otherwise
CC: Warning: Option -fasynchronous-unwind-tables passed to ld, if ld is
invoked, ignored otherwise
ld: fatal: auxiliary filter option (-f, --auxiliary) is only available when
building a shared object
ld: fatal: flags processing errors
make[3]: *** [build/genmddeps] Error 2
make[3]: Leaving directory `/appl/archives/local_build/build-gcc/gcc-4.9.2/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/appl/archives/local_build/build-gcc/gcc-4.9.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/appl/archives/local_build/build-gcc/gcc-4.9.2'


NOTE:  /appl/local_build is a sym link to /appl/archives/local_build.


Why would invalid flags be passed to LD (LDFLAGS) which was setup by configure?

How can this be resolved?


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