Skip to content

Commit 974cd11

Browse files
authored
Merge pull request #4249 from RajalakshmiSR/clang_fix
powerpc: Fix build errors with Open XL C
2 parents 6287a23 + db08059 commit 974cd11

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

Makefile.power

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ endif
9898
endif
9999
endif
100100

101+
ifeq ($(C_COMPILER), CLANG)
102+
CCOMMON_OPT += -fno-integrated-as
103+
endif
101104
# workaround for C->FORTRAN ABI violation in LAPACKE
102105
ifeq ($(F_COMPILER), GFORTRAN)
103106
FCOMMON_OPT += -fno-optimize-sibling-calls
@@ -133,7 +136,11 @@ ifdef BINARY64
133136

134137

135138
ifeq ($(OSNAME), AIX)
139+
ifeq ($(C_COMPILER), GCC)
136140
CCOMMON_OPT += -mpowerpc64 -maix64
141+
else
142+
CCOMMON_OPT += -m64
143+
endif
137144
ifeq ($(COMPILER_F77), g77)
138145
FCOMMON_OPT += -mpowerpc64 -maix64
139146
endif

c_check

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,19 @@ esac
9696
defined=0
9797

9898
if [ "$os" = "AIX" ]; then
99-
case "$BINARY" in
100-
32) compiler_name="$compiler_name -maix32" ;;
101-
64) compiler_name="$compiler_name -maix64" ;;
102-
esac
103-
defined=1
99+
if [ "$compiler" = "GCC" ]; then
100+
case "$BINARY" in
101+
32) compiler_name="$compiler_name -maix32" ;;
102+
64) compiler_name="$compiler_name -maix64" ;;
103+
esac
104+
defined=1
105+
else
106+
case "$BINARY" in
107+
32) compiler_name="$compiler_name -m32" ;;
108+
64) compiler_name="$compiler_name -m64" ;;
109+
esac
110+
defined=1
111+
fi
104112
fi
105113

106114
case "$architecture" in

kernel/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ endif
55
TOPDIR = ..
66
include $(TOPDIR)/Makefile.system
77

8-
ifeq ($(ARCH), power)
9-
ifeq ($(C_COMPILER), CLANG)
10-
override CFLAGS += -fno-integrated-as
11-
endif
12-
endif
13-
148
AVX2OPT =
159
ifeq ($(C_COMPILER), GCC)
1610
# AVX2 support was added in 4.7.0

0 commit comments

Comments
 (0)