[openssl-dev] per-file or -module flags in build.info?

Richard Levitte levitte at openssl.org
Thu Oct 27 16:42:50 UTC 2016


The only way is to use raw lines for your platform, something like
this for Unix:

    OVERRIDES=foo.o
    BEGINRAW[Makefile(unix)]
    foo.o: foo.c
    	$(CC) $(CFLAGS) -O3 -c -o $@ $<
    ENDRAW[Makefile(unix)]

The reason for this is that as soon as you want to add compiler
specific flags, you also walk away from build.info's general platform
independence.  BEGINRAW / ENDRAW is your escape from that
independence.

That being said, I wouldn't recommend mixing object files with and
without debugging information.  Configure has the option --debug (-d
to config) to enable debugging, the rest is (hopefully) in the config
target in Configurations/10-main.conf.

Cheers,
Richard

In message <9c8b7283-745f-1b33-dab3-b79cfca84a73 at akamai.com> on Thu, 27 Oct 2016 11:04:13 -0500, Benjamin Kaduk <bkaduk at akamai.com> said:

bkaduk> Is it possible in the unified build system to apply certain compiler
bkaduk> (or linker) flags only to a specific file or set of files? This could
bkaduk> make some scenarios easier when one is willing to patch the tree
bkaduk> (e.g., build some things with -O3 and others with -O0 -ggdb3).
bkaduk> 
bkaduk> Given that the unified build outputs a single unified Makefile to
bkaduk> build everything, it seems unlikely, but I just wanted to check.
bkaduk> 
bkaduk> Thanks,
bkaduk> 
bkaduk> Ben


More information about the openssl-dev mailing list