From e8596d90a5ef66446c82c28e0de9cc5236881ef2 Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Fri, 22 Jun 2012 14:02:20 +0200 Subject: [PATCH 1/1] Revert to the correct value of lddlflags for AddressSanitizer -Afoo=val appends 'val' to the value of variable foo after the platform hints are processed, but before the default value is computed by Configure. At this time, 'foo' appears as non-empty and Configure skips the default logic. This is the reason -shared must always be added to lddlflags. I don't know why I didn't caught this while testing AddressSanitizer builds. --- pod/perlhacktips.pod | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 91ef14a..6c33550 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -1172,8 +1172,9 @@ Windows. To build perl with AddressSanitizer, your Configure invocation should look like: - sh Configure -des -Dcc=clang -Accflags=-faddress-sanitizer \ - -Aldflags=-faddress-sanitizer -Alddlflags=-faddress-sanitizer + sh Configure -des -Dcc=clang \ + -Accflags=-faddress-sanitizer -Aldflags=-faddress-sanitizer \ + -Alddlflags=-shared\ -faddress-sanitizer where these arguments mean: @@ -1192,13 +1193,12 @@ Compile perl and extensions sources with AddressSanitizer. Link the perl executable with AddressSanitizer. -=item * -Alddlflags=-faddress-sanitizer +=item * -Alddlflags=-shared\ -faddress-sanitizer -Link dynamic extensions with AddressSanitizer. - -If you also pass C<-Duseshrplib> to Configure in order to build a -shared perl library, then you must replace this by -C<-Alddlflags=-shared\ -faddress-sanitizer>. +Link dynamic extensions with AddressSanitizer. You must manually +specify C<-shared> because using C<-Alddlflags=-shared> will prevent +Configure from setting a default value for C, which usually +contains C<-shared> (at least on linux). =back -- 1.8.3.1