Skip to contentSkip to conversation

configure: Try to figure out compiler options

PATCH In review Dennis Stosberg 1 participant 1 message Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 configure: Try to figure out compiler options

This patch adds tests to determine of what flavour the used compiler is and sets CFLAGS and the PIC flag appropriately.

---
 Makefile      |    3 ++-
 config-lib.sh |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 53 insertions(+), 6 deletions(-)
Makefile +2 -1
index 4dc5379..23c784e 100644
@@ -96,6 +96,7 @@ ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 PERL_CFLAGS =
 PERL_LDFLAGS =
+PICFLAG = -fPIC
 STRIP ?= strip
 
 prefix = $(HOME)
@@ -483,7 +484,7 @@ endif
 endif
 endif
 ifdef USE_PIC
-	ALL_CFLAGS += -fPIC
+	ALL_CFLAGS += $(PICFLAG)
 endif
 ifdef NO_ACCURATE_DIFF
 	BASIC_CFLAGS += -DNO_ACCURATE_DIFF
config-lib.sh +51 -5

88 lines not on this page · raw message

Signature · 1 line
1.4.1