per-file or -module flags in build.info?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

per-file or -module flags in build.info?

Benjamin Kaduk
Is it possible in the unified build system to apply certain compiler (or linker) flags only to a specific file or set of files?  This could make some scenarios easier when one is willing to patch the tree (e.g., build some things with -O3 and others with -O0 -ggdb3).

Given that the unified build outputs a single unified Makefile to build everything, it seems unlikely, but I just wanted to check.

Thanks,

Ben

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: per-file or -module flags in build.info?

Richard Levitte - VMS Whacker-2
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 <[hidden email]> on Thu, 27 Oct 2016 11:04:13 -0500, Benjamin Kaduk <[hidden email]> 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
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev