[m-rev.] diff: improve PIC option handling
Simon Taylor
stayl at cs.mu.OZ.AU
Mon Feb 17 00:05:22 AEDT 2003
On 13-Feb-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
>
> Estimated hours taken: 0.25
> Branches: main
>
> compiler/handle_options.m:
> Make `--mercury-linkage shared' imply `--pic-reg'.
> I don't think this actually fixes any bugs, because
> compile_target_code.m worked out whether `--pic-reg'
> was needed.
This change was wrong.
Estimated hours taken: 0.25
Branches: main
compiler/handle_options.m:
My change to make `--mercury-linkage shared' imply `--pic-reg'
was incorrect because `mmc --make --mercury-linkage shared libfoo.a'
would use `--pic-reg' when creating the object files in libfoo.a.
Index: handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.172
diff -u -u -r1.172 handle_options.m
--- handle_options.m 13 Feb 2003 00:24:38 -0000 1.172
+++ handle_options.m 16 Feb 2003 13:00:37 -0000
@@ -473,16 +473,6 @@
% On x86, using PIC takes a register away from us.
option_implies(pic, pic_reg, bool(yes)),
- % If we're linking with shared Mercury libraries, we need
- % to use the same calling convention as those libraries.
- globals__io_lookup_string_option(mercury_linkage, MercuryLinkage),
- ( { MercuryLinkage = "shared" } ->
- globals__io_set_option(pic_reg, bool(yes))
- ;
- []
- ),
-
-
% --high-level-code disables the use of low-level gcc extensions
option_implies(highlevel_code, gcc_non_local_gotos, bool(no)),
option_implies(highlevel_code, gcc_global_registers, bool(no)),
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list