Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbppc/conf Add hack for clang for ibm4xx/trap.c.



details:   https://anonhg.NetBSD.org/src/rev/77e9873bc5aa
branches:  trunk
changeset: 369979:77e9873bc5aa
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Sep 11 09:14:56 2022 +0000

description:
Add hack for clang for ibm4xx/trap.c.

Integrated as does not recognize {l,st}swx, that have been
requisite insns by architecture since 601.

Also, it does not pass gas for appropriate -mfoo flag.

diffstat:

 sys/arch/evbppc/conf/Makefile.evbppc.inc |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 3a8767a6b736 -r 77e9873bc5aa sys/arch/evbppc/conf/Makefile.evbppc.inc
--- a/sys/arch/evbppc/conf/Makefile.evbppc.inc  Sun Sep 11 09:08:04 2022 +0000
+++ b/sys/arch/evbppc/conf/Makefile.evbppc.inc  Sun Sep 11 09:14:56 2022 +0000
@@ -1,7 +1,19 @@
-#      $NetBSD: Makefile.evbppc.inc,v 1.8 2011/06/25 02:26:53 matt Exp $
+#      $NetBSD: Makefile.evbppc.inc,v 1.9 2022/09/11 09:14:56 rin Exp $
 
 CPPFLAGS += -D__${BOARDTYPE}__
 
 RAMDISKDIR!=   cd ${NETBSDSRCDIR}/distrib/${THISPPC:T}/ramdisk && ${PRINTOBJDIR}
 
 .-include "${THISPPC}/conf/Makefile.${BOARDTYPE}.inc"
+
+# XXX hack for clang:
+# - integrated as does not recognize {l,st}swx.
+# - it does not pass gas for appropriate -mfoo flag.
+.if ${ACTIVE_CC} == "clang"
+.  if !empty(AFLAGS:M-mcpu=403)
+COPTS.trap.c+= -fno-integrated-as -Wa,-m403
+.  endif
+.  if !empty(AFLAGS:M-mcpu=405)
+COPTS.trap.c+= -fno-integrated-as -Wa,-m405
+.  endif
+.endif



Home | Main Index | Thread Index | Old Index