summaryrefslogtreecommitdiff
path: root/gcc/config/arm/linux-elf.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-11 03:18:02 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-11 03:18:02 +0000
commit7e530fadc06781a0d1566d69f000301262ca3d93 (patch)
treea54f2bc0212c863a4196ecc6fcaaa57d680d48d7 /gcc/config/arm/linux-elf.h
parent6278b80d574ace8043d6938313d9faaf19341680 (diff)
downloadgcc-7e530fadc06781a0d1566d69f000301262ca3d93.tar.gz
2004-11-10 Peter S. Mazinger <ps.m@gmx.net>
* config/mips/linux.h (LINUX_TARGET_OS_CPP_BUILTINS): Define __PIC__ and __pic__ only if TARGET_ABICALLS. (SUBTARGET_CPP_SPECS): Don't define or undefine __PIC__ and __pic__. (SUBTARGET_ASM_SPECS): Don't pass -non_shared to assembler; pass -KPIC only if not -mno-abicalls. * config/alpha/linux.h, config/arm/linux-elf.h, config/pa/pa-linux.h * config/sparc/linux.h, config/sparc/linux64.h (TARGET_OS_CPP_BUILTINS): Define __PIC__ and __pic__ if flag_pic. * config/arm/linux-gas.h (CPP_SPEC): Don't define __PIC__ or __pic__. * config/pa/pa/linux.h (CPP_SPEC): Likewise. * config/sparc/linux.h (CPP_SUBTARGET_SPEC): Likewise. * config/sparc/linux64.h (CPP_SUBTARGET_SPEC): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/linux-elf.h')
-rw-r--r--gcc/config/arm/linux-elf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 616921b20c3..892acf2d86c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -89,7 +89,17 @@
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
-#define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ LINUX_TARGET_OS_CPP_BUILTINS(); \
+ if (flag_pic) \
+ { \
+ builtin_define ("__PIC__"); \
+ builtin_define ("__pic__"); \
+ } \
+ } \
+ while (0)
/* This is how we tell the assembler that two symbols have the same value. */
#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \