[uClibc-cvs] svn commit: trunk/uClibc
vapier at uclibc.org
vapier at uclibc.org
Fri Jul 29 03:44:35 UTC 2005
Author: vapier
Date: 2005-07-28 21:44:35 -0600 (Thu, 28 Jul 2005)
New Revision: 10955
Log:
finish cleaning up the PIE flag checks
Modified:
trunk/uClibc/Rules.mak
Changeset:
Modified: trunk/uClibc/Rules.mak
===================================================================
--- trunk/uClibc/Rules.mak 2005-07-29 03:36:00 UTC (rev 10954)
+++ trunk/uClibc/Rules.mak 2005-07-29 03:44:35 UTC (rev 10955)
@@ -115,9 +115,8 @@
OPTIMIZATION:=
PICFLAG:=-fPIC
+PIEFLAG_NAME:=-fPIE
-PIEFLAG:=$(call check_gcc,-fPIE,)
-
# Some nice CPU specific optimizations
ifeq ($(strip $(TARGET_ARCH)),i386)
OPTIMIZATION+=$(call check_gcc,-mpreferred-stack-boundary=2,)
@@ -207,7 +206,7 @@
CPU_LDFLAGS-$(CONFIG_CRIS)+=-mcrislinux
CPU_CFLAGS-$(CONFIG_CRIS)+=-mlinux
PICFLAG:=-fpic
- PIEFLAG:=$(call check_gcc,-fpie,)
+ PIEFLAG_NAME:=-fpie
endif
ifeq ($(strip $(TARGET_ARCH)),powerpc)
@@ -215,27 +214,26 @@
# enough. Therefore use -fpic which will reduce code size and generates
# faster code.
PICFLAG:=-fpic
- PIEFLAG:=$(call check_gcc,-fpie,)
+ PIEFLAG_NAME:=-fpie
endif
ifeq ($(strip $(TARGET_ARCH)),frv)
CPU_LDFLAGS-$(CONFIG_FRV)+=-melf32frvfd
CPU_CFLAGS-$(CONFIG_FRV)+=-mfdpic
- # Using -pie causes the program to have an interpreter, which is
- # forbidden, so we must make do with -shared. Unfortunately,
- # -shared by itself would get us global function descriptors
- # and calls through PLTs, dynamic resolution of symbols, etc,
- # which would break as well, but -Bsymbolic comes to the rescue.
- LDPIEFLAG=-shared -Bsymbolic
UCLIBC_LDSO=ld.so.1
endif
+ifneq ($(UCLIBC_BUILD_PIE),y)
+PIEFLAG:=
+else
+PIEFLAG:=$(call check_gcc,$(PIEFLAG_NAME),)
+endif
+
# Use '-Os' optimization if available, else use -O2, allow Config to override
OPTIMIZATION+=$(call check_gcc,-Os,-O2)
# Use the gcc 3.4 -funit-at-a-time optimization when available
OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
-
# Add a bunch of extra pedantic annoyingly strict checks
XWARNINGS=$(subst ",, $(strip $(WARNINGS))) -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
@@ -255,11 +253,6 @@
endif
endif
-ifneq ($(UCLIBC_BUILD_PIE),y)
-PIEFLAG=
-LDPIEFLAG=
-endif
-
SSP_DISABLE_FLAGS:=$(call check_gcc,-fno-stack-protector,)
ifeq ($(UCLIBC_BUILD_SSP),y)
SSP_CFLAGS:=$(call check_gcc,-fno-stack-protector-all,)
More information about the uClibc-cvs
mailing list