This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^2] [PATCH] PR59063


On Fri, Nov 29, 2013 at 9:48 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Nov 29, 2013 at 9:06 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Fri, Nov 29, 2013 at 9:02 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Fri, Nov 29, 2013 at 8:47 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> On Fri, Nov 29, 2013 at 4:31 AM, Yury Gribov <y.gribov@samsung.com> wrote:
>>>>>> Please fix up formatting
>>>>>
>>>>>> Also, isn't libsanitizer/libsanitizer.spec.in missing from the patch?
>>>>>>
>>>>>> Ok with that fixed.
>>>>>
>>>>>  Thanks, r205524
>>>>>
>>>>
>>>> On Linux/x86, I got
>>>>
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O0  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O0  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O1  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O1  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2 -flto -fno-use-linker-plugin
>>>> -flto-partition=none  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2 -flto -fno-use-linker-plugin
>>>> -flto-partition=none  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2 -flto -fuse-linker-plugin
>>>> -fno-fat-lto-objects  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2 -flto -fuse-linker-plugin
>>>> -fno-fat-lto-objects  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O2  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O3 -fomit-frame-pointer  (test
>>>> for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O3 -fomit-frame-pointer  (test
>>>> for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O3 -g  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -O3 -g  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -Os  (test for excess errors)
>>>> FAIL: c-c++-common/asan/pr59063-2.c  -Os  (test for excess errors)
>>>>
>>>
>>> This change
>>>
>>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>>> index e0bf2da..823265c 100644
>>> --- a/gcc/testsuite/lib/asan-dg.exp
>>> +++ b/gcc/testsuite/lib/asan-dg.exp
>>> @@ -39,9 +39,9 @@ proc asan_link_flags { paths } {
>>>      set shlib_ext [get_shlib_extension]
>>>
>>>      if { $gccpath != "" } {
>>> +      append flags " -B${gccpath}/libsanitizer/asan/ "
>>>        if { [file exists "${gccpath}/libsanitizer/asan/.libs/libasan.a"]
>>>       || [file exists
>>> "${gccpath}/libsanitizer/asan/.libs/libasan.${shlib_ext}"] } {
>>> -    append flags " -B${gccpath}/libsanitizer/asan/ "
>>>      append flags " -L${gccpath}/libsanitizer/asan/.libs "
>>>      append ld_library_path ":${gccpath}/libsanitizer/asan/.libs"
>>>        }
>>>
>>> is wrong since
>>>
>>> [hjl@gnu-6 x86_64-unknown-linux-gnu]$ find libsanitizer -name libsanitizer.spec
>>> libsanitizer/libsanitizer.spec
>>> [hjl@gnu-6 x86_64-unknown-linux-gnu]$
>>>
>>
>> I am checking in this as an obvious fix.  Tested
>> on Linux/x86.
>>
>> --
>> H.J.
>> --
>> diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
>> index 823265c..1e6c7dd 100644
>> --- a/gcc/testsuite/lib/asan-dg.exp
>> +++ b/gcc/testsuite/lib/asan-dg.exp
>> @@ -39,9 +39,10 @@ proc asan_link_flags { paths } {
>>      set shlib_ext [get_shlib_extension]
>>
>>      if { $gccpath != "" } {
>> -      append flags " -B${gccpath}/libsanitizer/asan/ "
>> +      append flags " -B${gccpath}/libsanitizer/ "
>>        if { [file exists "${gccpath}/libsanitizer/asan/.libs/libasan.a"]
>>         || [file exists
>> "${gccpath}/libsanitizer/asan/.libs/libasan.${shlib_ext}"] } {
>> +      append flags " -B${gccpath}/libsanitizer/asan/ "
>>        append flags " -L${gccpath}/libsanitizer/asan/.libs "
>>        append ld_library_path ":${gccpath}/libsanitizer/asan/.libs"
>
> I think bootstrap-asan.mk should also be updated.
>

I checked in this as an obvious fix.  Tested on Linux/x86-64.

-- 
H.J.
---
diff --git a/config/ChangeLog b/config/ChangeLog
index 313572d..1f051a3 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+    * bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
+    -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
+
 2013-11-19  Marek Polacek  <polacek@redhat.com>

     * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl.
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
index e3f34f5..fbef021 100644
--- a/config/bootstrap-asan.mk
+++ b/config/bootstrap-asan.mk
@@ -3,5 +3,6 @@
 STAGE2_CFLAGS += -fsanitize=address
 STAGE3_CFLAGS += -fsanitize=address
 POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
+              -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
               -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/ \
               -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]