[PATCH] Use compilation flags.

Salvo Tomaselli tiposchi at tiscali.it
Thu Aug 21 15:33:56 PDT 2014


In data giovedì 21 agosto 2014 11:42:59, Thiago Macieira ha scritto:
> Have you tested this? I'm trying here and the generated Makefile is
> identical to the one without this patch.

Well I guess you'd need to set some CFLAGS to see some effects.

I did try to build a debian package with and without this patch, using the 
hardening flags (stack protector, random locations and so on) and results were 
different. And if it had worked from the beginning I wouldn't have sent a 
patch, so I think there is a problem with CFLAGS being ignored.

> And in any case, I don't think this would work. If you got your way, qmake
> would generate:
When I build, my Makefile has something like this:

CFLAGS        = -m64 -pipe -Werror=int-to-pointer-cast -Werror=pointer-to-int-
cast -Werror=implicit-int -Wno-unused-result -Wno-pointer-sign -fno-strict-
overflow -Wno-maybe-uninitialized -std=gnu99 -I/usr/include/libxml2 -g -O2 -
fPIE -fstack-protector-strong -Wformat -Werror=format-security -march=corei7 -
flto -O2 -D_REENTRANT $(DEFINES)

Which contains the extra stuff I defined in CFLAGS, so I think it's working 
more or less ok.

I am not a qmake expert so I don't really know if it can be solved in a better 
way, but I think it's still better than totally ignoring CFLAGS.

Best
-- 
Salvo Tomaselli

"Io non mi sento obbligato a credere che lo stesso Dio che ci ha dotato di
senso, ragione ed intelletto intendesse che noi ne facessimo a meno."
                -- Galileo Galilei

http://ltworf.github.io/ltworf/


More information about the subsurface mailing list