Re: gcc again, only on i686 and f29+ hidden symbol cpu_model referenced by dso

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-03-13 at 10:29 +0100, Florian Weimer wrote:
> * Sérgio Basto:
> 
> > [3]
> > export LDFLAGS="%{?__global_ldflags} -shared"
> 
> Not sure why you think this would work.  It prevents the compiler
> from
> creating any executables at all.


With -shared fixed this generation of binaries [1], it is a tip mention
in old thread mention in my previous email, AFAIU.

[1]
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686
-mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-
unwind-tables -fstack-clash-protection -fcf-protection -pthread
-std=c++11 -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o projectM-unittest
projectM-unittest.o getConfigFilename.o -pthread  -lSDL2
../libprojectM/.libs/libprojectM.so -lGL -ldl -pthread  -
D__LIBTOOL_NO_RPATH__  -shared 

> 
> The problem is earlier, here:
> 
> libtool: link: g++ -fPIC -DPIC -shared -nostdlib
>   /usr/lib/gcc/i686-redhat-linux/9/../../../crti.o
>   /usr/lib/gcc/i686-redhat-linux/9/crtbeginS.o .libs/ConfigFile.o
>   .libs/Preset.o .libs/PresetLoader.o .libs/timer.o
> .libs/KeyHandler.o
>   .libs/PresetChooser.o .libs/TimeKeeper.o .libs/PCM.o
>   .libs/PresetFactory.o .libs/fftsg.o .libs/wipemalloc.o
>   .libs/PipelineMerger.o .libs/PresetFactoryManager.o
> .libs/projectM.o
>   .libs/TestRunner.o -Wl,--whole-archive
>  
> ../libprojectM/MilkdropPresetFactory/.libs/libMilkdropPresetFactory.a
>   ../libprojectM/NativePresetFactory/.libs/libNativePresetFactory.a
>   ../libprojectM/Renderer/.libs/libRenderer.a -Wl,--no-whole-archive
> -lGL
>   -ldl -L/usr/lib/gcc/i686-redhat-linux/9
>   -L/usr/lib/gcc/i686-redhat-linux/9/../../.. -lstdc++ -lm -lc
> -lgcc_s
>   /usr/lib/gcc/i686-redhat-linux/9/crtendS.o
>   /usr/lib/gcc/i686-redhat-linux/9/../../../crtn.o -Wl,-z,now
>   -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g
>   -fstack-protector-strong -grecord-gcc-switches
>   -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>   -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686
>   -mtune=generic -msse2 -mfpmath=sse -mstackrealign -pthread -Wl,-z
>   -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now
>   -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -pthread -pthread
>   -Wl,-soname -Wl,libprojectM.so.3 -o .libs/libprojectM.so.3.1.1
> 
> That linker command is just wrong.  You just can't use -nostdlib in
> this
> way.  There is no reference to libgcc, which is implicitly provided
> without -nostdlib.
> 
> I don't know why libtool attempts to link with -nostdlib.

Removing -nostdlib and all references to /usr/lib/gcc/i686-redhat-
linux/9/ [2] I also could build libprojectM.so.3.1.1 , but not fixed
this error (hidden symbol `__cpu_model' in /usr/lib/gcc/i686-redhat-
linux/9/libgcc.a(cpuinfo.o) is referenced by DSO)

I notice -nostdlib is only used one time in all build and its also
present on x86_64 and don't cause problems ... 

Thanks for the help, any other tip ? 

[2] 
g++  -fPIC -DPIC -shared .libs/ConfigFile.o .libs/Preset.o
.libs/PresetLoader.o .libs/timer.o .libs/KeyHandler.o
 .libs/PresetChooser.o .libs/TimeKeeper.o .libs/PCM.o
.libs/PresetFactory.o .libs/fftsg.o .libs/wipemalloc.o
.libs/PipelineMerger.o .libs/PresetFactoryManager.o .libs/projectM.o
.libs/TestRunner.o  -Wl,--whole-archive
../libprojectM/MilkdropPresetFactory/.libs/libMilkdropPresetFactory.a
../libprojectM/NativePresetFactory/.libs/libNativePresetFactory.a
../libprojectM/Renderer/.libs/libRenderer.a -Wl,
--no-whole-archive  -lGL -ldl -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-
strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-
hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32
-march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -pthread
-Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -pthread   -pthread -Wl,-
soname -Wl,libprojectM.so.3 -o .libs/libprojectM.so.3.1.1





> 
> Thanks,
> Florian
-- 
Sérgio M. B.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux