[compiler-rt] 2edd903 - [crt][test] Fix dso_handle.cpp for Linux systems which default to PIE

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 09:38:04 PDT 2022


Author: Fangrui Song
Date: 2022-04-07T09:37:59-07:00
New Revision: 2edd903c05333e152d797143bc2d9e1cce973a57

URL: https://github.com/llvm/llvm-project/commit/2edd903c05333e152d797143bc2d9e1cce973a57
DIFF: https://github.com/llvm/llvm-project/commit/2edd903c05333e152d797143bc2d9e1cce973a57.diff

LOG: [crt][test] Fix dso_handle.cpp for Linux systems which default to PIE

Added: 
    

Modified: 
    compiler-rt/test/crt/dso_handle.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/crt/dso_handle.cpp b/compiler-rt/test/crt/dso_handle.cpp
index 75529d0fd85e4..a32ce4b8d382b 100644
--- a/compiler-rt/test/crt/dso_handle.cpp
+++ b/compiler-rt/test/crt/dso_handle.cpp
@@ -1,7 +1,7 @@
 // RUN: %clangxx -g -DCRT_SHARED -c %s -fPIC -o %tshared.o
 // RUN: %clangxx -g -c %s -fPIC -o %t.o
 // RUN: %clangxx -g -shared -o %t.so -nostdlib %crti %crtbegin %tshared.o %libstdcxx -lc -lm %libgcc %crtend %crtn
-// RUN: %clangxx -g -o %t -nostdlib %crt1 %crti %crtbegin %t.o %libstdcxx -lc -lm %libgcc %t.so %crtend %crtn
+// RUN: %clangxx -g -o %t -fno-pic -no-pie -nostdlib %crt1 %crti %crtbegin %t.o %libstdcxx -lc -lm %libgcc %t.so %crtend %crtn
 // RUN: %run %t 2>&1 | FileCheck %s
 
 // UNSUPPORTED: arm, aarch64


        


More information about the llvm-commits mailing list