diff options
author | Richard Levitte <levitte@openssl.org> | 2016-01-30 02:17:05 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-10 14:34:06 +0100 |
commit | bcb1977b7f4186b5551d83839286bc02991c2ad3 (patch) | |
tree | 6d7b30a170bb62189fd7415488b5e8cb0d6e8a61 /Configurations | |
parent | Can't re-init after stop. (diff) | |
download | openssl-bcb1977b7f4186b5551d83839286bc02991c2ad3.tar.xz openssl-bcb1977b7f4186b5551d83839286bc02991c2ad3.zip |
Configure et al: treat C defines separately
With some compilers, C macros are defined differently on the command
line than on Unix. It could be that the flad to define them isn't -D,
it could also be that they need to be grouped together and not be mixed
in with the other compiler flags (that's how it's done on VMS, for
example).
On Unix family platform configurations, we can continue to have macro
definitions mixed in with the rest of the flags, so the changes in
Configurations/*.conf are kept to an absolute minimum.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/00-base-templates.conf | 11 | ||||
-rw-r--r-- | Configurations/99-personal-levitte.conf | 6 | ||||
-rw-r--r-- | Configurations/README | 17 |
3 files changed, 32 insertions, 2 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index 3cc078f8e6..713e374f72 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -1,6 +1,17 @@ +# -*- Mode: perl -*- %targets=( BASE => { template => 1, + + cflags => "", + defines => [], + debug_cflags => "", + debug_defines => [], + release_cflags => "", + release_defines => [], + thread_cflags => "", + thread_defines => [], + cpuid_asm_src => "mem_clr.c", bn_asm_src => "bn_asm.c", ec_asm_src => "", diff --git a/Configurations/99-personal-levitte.conf b/Configurations/99-personal-levitte.conf index d28cc6e934..fbfd3da37e 100644 --- a/Configurations/99-personal-levitte.conf +++ b/Configurations/99-personal-levitte.conf @@ -8,13 +8,15 @@ %targets = ( "levitte-linux-elf" => { inherit_from => [ "linux-elf" ], - debug_cflags => add("-DLEVITTE_DEBUG -ggdb -g3"), + debug_cflags => add("-ggdb -g3"), + debug_defines => add(undef, "LEVITTE_DEBUG"), build_scheme => [ "unified", "unix" ], build_file => "Makefile", }, "levitte-linux-x86_64" => { inherit_from => [ "linux-x86_64" ], - debug_cflags => add("-DLEVITTE_DEBUG -ggdb -g3"), + debug_cflags => add("-ggdb -g3"), + debug_defines => add(undef, "LEVITTE_DEBUG"), build_scheme => [ "unified", "unix" ], build_file => "Makefile", }, diff --git a/Configurations/README b/Configurations/README index 75907a6d5c..9f6071e8b9 100644 --- a/Configurations/README +++ b/Configurations/README @@ -23,18 +23,35 @@ In each table entry, the following keys are significant: libraries into the final program. cflags => Flags that are used at all times when compiling. + defines => As an alternative, macro definitions may be + present here instead of in `cflags'. If + given here, they MUST be as an array of the + string such as "MACRO=value", or just + "MACRO" for definitions without value. debug_cflags => Extra compilation flags used when making a debug build (when Configure receives the --debug option). Typically something like "-g -O0". + debug_defines => Similarly to `debug_cflags', this gets + combined with `defines' during a debug + build. The value here MUST also be an + array of the same form as for `defines'. release_cflags => Extra compilation flags used when making a release build (when Configure receives the --release option, or doesn't receive the --debug option). Typically something like "-O" or "-O3". + release_defines => Similarly to `release_cflags', this gets + combined with `defines' during a release + build. The value here MUST also be an + array of the same form as for `defines'. thread_cflags => Extra compilation flags used when compiling with threading enabled. Explained further below. [2] + thread_defines => Similarly to `thread_cflags', this gets + combined with `defines' when threading is + enabled. The value here MUST also be an + array of the same form as for `defines'. shared_cflag => Extra compilation flags used when compiling for shared libraries, typically something like "-fPIC". |