Improve 64-bit support for GCC on AIX

pull/531/head
Jeffrey Walton 2017-10-18 05:55:12 -04:00
parent c2c0a1ed82
commit 6f25cf682a
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 4 deletions

View File

@ -397,20 +397,20 @@ ifeq ($(XLC_COMPILER),1)
CXXFLAGS := $(CXXFLAGS:-fPIC=-qpic)
endif
HAVE_BITS=$(shell echo $(CXXFLAGS) | $(GREP) -i -c -E '\-q32|\-q64')
ifeq ($(IS_PPC64)$(HAVE_BITS),10)
ifeq ($(IS_PPC64)$(XLC_COMPILER)$(HAVE_BITS),110)
CXXFLAGS += -q64
else
ifeq ($(IS_PPC32)$(HAVE_BITS),10)
ifeq ($(IS_PPC32)$(XLC_COMPILER)$(HAVE_BITS),110)
CXXFLAGS += -q32
endif
endif
ifeq ($(findstring -q64,$(CXXFLAGS)),-q64)
ifeq ($(findstring -X64,$(CXXFLAGS)),-X64)
ifeq ($(findstring -X64,$(ARFLAGS)),)
ARFLAGS := -r -X64
endif
else
ifeq ($(findstring -q32,$(CXXFLAGS)),-q32)
ifeq ($(findstring -X32,$(CXXFLAGS)),-X32)
ifeq ($(findstring -X32,$(ARFLAGS)),)
ARFLAGS := -r -X32
endif
endif