Unrecognized command line option '-rdynamic on GCC v4.9.2
I am using GCC v4.9.2 under Cygwin on Windows 7 64-bit, but am running into a problem trying to compile uWSGI .
The error I am getting is -
gcc: error: unrecognized command line option β-rdynamicβ
GCC version release -
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.2-3.x86_64/src/gcc-4.9.2/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.2-3.x86_64/src/gcc-4.9.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.9.2 (GCC)
I am calling assembly with CFLAGS="-Wno-error" make
.
I'm not sure why I am getting this error, as I can see in the documentation from here that the flag -rdynamic
exists.
What am I missing?
source to share
I think I got it ...
Here's what happens on my laptop (Cygwin 2.831 x86 on W7 x64):
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-cygwin/4.8.2/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-1/src/gcc-4.8.2/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-1/src/gcc-4.8.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
Thread model: posix
gcc version 4.8.2 (GCC)
When I pass : -rdynamic
gcc -rdynamic
gcc: fatal error: no input files
compilation terminated.
Compared to : -rdynamic1
gcc -rdynamic1
gcc: error: unrecognized command line option β-rdynamic1β
gcc: fatal error: no input files
compilation terminated.
man
My gcc page mentions this (I'm not sure how important it is) but gcc -v --help
does not display it according to the specific linker options. I thought there might be something different from how set up gcc
, but I didn't see any difference that mattered (both have --with-gnu-ld
- which seem to be related - set).
Then I downloaded the sources 4.8.2
and 4.9.2
and started searching and comparing, but again I couldn't find anything (true, the search can be expanded widely :)).
But when looking at the file configure
I noticed something that might be related, then I checked the command line parameters ld
and I think I have an alternative:
Instead, you can transfer . This works for me (it doesn't really matter as it also works for me, unlike your case :)) -rdynamic
-Wl,--export-all-symbols
-rdynamic
source to share
The link you give says:
-rdynamic
Pass the -export-dynamic flag to the ELF listing, to targets that support it. This gives the link to the linker to add all symbols, not just those used, to the dynamic symbol table. This parameter is required for some dlopen applications or to get backtraces from a program.
(emphasis added)
Is Cygwin ELF Object Files? It seems unlikely.
source to share