On Sun, Jul 24, 2016 at 03:53:39PM -0300, Paulo wrote: > Opa, > > fiz um teste que pode dar uma luz, para quem entende!! > > Alterei o makefile.in que que produz as linhas onde não aparecia o FORTIFY colocando "na unha" a flag, assim. > > grep g++ ../*.build | grep -v FORTIFY > > checking for g++... g++ > checking whether g++ accepts -g... yes > checking dependency style of g++... none > checking how to run the C++ preprocessor... g++ -E > checking for ld used by g++... /usr/bin/ld -m elf_x86_64 > checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes > checking for g++ option to produce PIC... -fPIC > checking if g++ PIC flag -fPIC works... yes > checking if g++ supports -c -o file.o... yes > checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes > > ou seja aquelas linhas que não possuíam o FORTiFY passaram a possuir ficando assim: > > /bin/bash ../../libtool --mode=link g++ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -D_FORTIFY_SOURCE=2 -o lostirc main.o MainWindow.o MainNotebook.o Tab.o Prefs.o ServerWindow.o GuiCommands.o Entry.o StatusBar.o TextWidget.o NickList.o DCCList.o ../libirc/libirc.a -lgtkmm-2.4 -lgtk-x11-2.0 -lgdkmm-2.4 -lgiomm-2.4 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lfontconfig -lfreetype -latkmm-1.6 -latk-1.0 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo > mkdir .libs > > g++ -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -D_FORTIFY_SOURCE=2 -o lostirc main.o MainWindow.o MainNotebook.o Tab.o Prefs.o ServerWindow.o GuiCommands.o Entry.o StatusBar.o TextWidget.o NickList.o DCCList.o ../libirc/libirc.a -lgtkmm-2.4 -lgdkmm-2.4 -lgiomm-2.4 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lfontconfig /usr/lib/x86_64-linux-gnu/libfreetype.so -latkmm-1.6 -latk-1.0 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -Wl,--rpath -Wl,/usr/lib/x86_64-linux-gnu -Wl,--rpath -Wl,/usr/lib/x86_64-linux-gnu > > No entanto..... o problema é que -D_FORTIFY_SOURCE=2 afeta o preprocessador, e nesses dois comandos aqui você está apenas fazendo o link de binários pré-compilados (*.o) num binário dinâmico final. o -D_FORTIFY_SOURCE=2 aparece nos pontos onde se está compilando de fato o código C (*.c) pros arquivos de código objeto (*.o)?
Attachment:
signature.asc
Description: PGP signature