On Fri, 4 Jan 2019 17:11:01 +0000, Stuart Henderson wrote:
> On 2019/01/04 17:57, Pascal Stumpf wrote:
> > This switches aarch64 to use GCC 8.2.0 as default.  Doesn't do any harm
> > because this is the first GCC port that works there.
> > 
> > We still need to decide whether to hook up gcc8 on all archs or aarch64
> > only ...
> 
> It needs hooking up in lang/gcc/Makefile for all arches. If you want to
> restrict it to only certain arches then that needs doing via ONLY_FOR_ARCHS
> / NOT_FOR_ARCHS in gcc/8/Makefile.
> 
> > Index: gcc4.port.mk
> > ===================================================================
> > RCS file: /cvs/ports/infrastructure/mk/gcc4.port.mk,v
> > retrieving revision 1.12
> > diff -u -p -r1.12 gcc4.port.mk
> > --- gcc4.port.mk    8 Mar 2016 16:46:05 -0000       1.12
> > +++ gcc4.port.mk    4 Jan 2019 16:02:48 -0000
> > @@ -1,2 +1,6 @@
> > +.if ${MACHINE_ARCH} == "aarch64"
> > +MODGCC4_VERSION?=8
> > +.else
> >  MODGCC4_VERSION?=4.9
> > +.endif
> >  .include "${PORTSDIR}/lang/gcc/${MODGCC4_VERSION}/gcc4.port.mk"
> > 
> 
> It needs some work in arch-defines.mk as well, maybe also
> compiler.port.mk and fortran.port.mk. I had a quick look but can't pay
> it enough attention at the moment to find my way through the maze of
> gcc4, gcc49 etc.
> 

Indeed.  We should probably rename GCC49_ARCHS to something more
sensible and adjust the tree accordingly.  Untested diff:


Index: infrastructure/mk/arch-defines.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.56
diff -u -p -r1.56 arch-defines.mk
--- infrastructure/mk/arch-defines.mk   21 Nov 2018 08:03:54 -0000      1.56
+++ infrastructure/mk/arch-defines.mk   4 Jan 2019 18:08:33 -0000
@@ -35,13 +35,14 @@ LLD_ARCHS = aarch64 amd64 arm
 # arches where ports devel/llvm builds - populates llvm ONLY_FOR_ARCHS
 # as well as available for PROPERTIES checks.
 LLVM_ARCHS = aarch64 amd64 arm i386 mips64 mips64el powerpc sparc64
-# arches where gcc4.9 exists.  To be used again for modules
-GCC49_ARCHS =alpha amd64 arm hppa i386 mips64 mips64el powerpc sparc64
+# arches where ports gcc exists.  To be used again for modules
+PORTS_GCC_ARCHS = aarch64 alpha amd64 arm hppa i386 mips64 mips64el powerpc \
+                       sparc64
 
 # arches where there is a C++11 compiler, either clang in base or gcc4
-CXX11_ARCHS = ${CLANG_ARCHS} ${GCC49_ARCHS}
+CXX11_ARCHS = ${CLANG_ARCHS} ${PORTS_GCC_ARCHS}
 
-.for PROP in ALL APM BE LE LP64 CLANG GCC4 GCC3 GCC49 MONO LLVM \
+.for PROP in ALL APM BE LE LP64 CLANG GCC4 GCC3 PORTS_GCC MONO LLVM \
                      CXX11 OCAML_NATIVE OCAML_NATIVE_DYNLINK GO \
                      LLD RUST
 .  for A B in ${MACHINE_ARCH} ${ARCH}
Index: infrastructure/mk/compiler.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/compiler.port.mk,v
retrieving revision 1.5
diff -u -p -r1.5 compiler.port.mk
--- infrastructure/mk/compiler.port.mk  17 Nov 2017 00:24:01 -0000      1.5
+++ infrastructure/mk/compiler.port.mk  4 Jan 2019 18:08:33 -0000
@@ -41,7 +41,7 @@ _COMPILER_ARCHS += ${CLANG_ARCHS}
 CHOSEN_COMPILER ?= base-clang
 .    endif
 .  elif "$c" == "ports-gcc"
-MODGCC4_ARCHS ?=       ${GCC49_ARCHS}
+MODGCC4_ARCHS ?=       ${PORTS_GCC_ARCHS}
 _MODGCC4_ARCH_USES =   No
 _COMPILER_ARCHS += ${MODGCC4_ARCHS}
 .    for _i in ${MODGCC4_ARCHS}
Index: lang/gcc/4.9/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- lang/gcc/4.9/Makefile       17 Dec 2018 14:05:21 -0000      1.64
+++ lang/gcc/4.9/Makefile       4 Jan 2019 18:08:33 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile,v 1.64 2018/12/17 14:05:21 pascal Exp $
 
-ONLY_FOR_ARCHS = ${GCC49_ARCHS}
+ONLY_FOR_ARCHS = alpha amd64 arm hppa i386 mips64 mips64el powerpc sparc64
 DPB_PROPERTIES = parallel
 
 V = 4.9.4
Index: lang/gcc/4.9/gcc4.port.mk
===================================================================
RCS file: /cvs/ports/lang/gcc/4.9/gcc4.port.mk,v
retrieving revision 1.11
diff -u -p -r1.11 gcc4.port.mk
--- lang/gcc/4.9/gcc4.port.mk   4 Jan 2019 17:29:53 -0000       1.11
+++ lang/gcc/4.9/gcc4.port.mk   4 Jan 2019 18:08:33 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: gcc4.port.mk,v 1.11 2019/01/04 17:29:53 pascal Exp $
 
-MODGCC4_ARCHS ?= ${GCC49_ARCHS}
+MODGCC4_ARCHS ?= ${PORTS_GCC_ARCHS}
 MODGCC4_LANGS ?=
 
 
Index: lang/gcc/6/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/6/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- lang/gcc/6/Makefile 29 Dec 2018 10:11:20 -0000      1.24
+++ lang/gcc/6/Makefile 4 Jan 2019 18:08:33 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile,v 1.24 2018/12/29 10:11:20 pascal Exp $
 
-ONLY_FOR_ARCHS = ${GCC49_ARCHS}
+ONLY_FOR_ARCHS = alpha amd64 arm hppa i386 mips64 mips64el powerpc sparc64
 DPB_PROPERTIES = parallel
 
 V = 6.5.0
Index: lang/gcc/6/gcc4.port.mk
===================================================================
RCS file: /cvs/ports/lang/gcc/6/gcc4.port.mk,v
retrieving revision 1.4
diff -u -p -r1.4 gcc4.port.mk
--- lang/gcc/6/gcc4.port.mk     5 Nov 2018 11:52:55 -0000       1.4
+++ lang/gcc/6/gcc4.port.mk     4 Jan 2019 18:08:33 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: gcc4.port.mk,v 1.4 2018/11/05 11:52:55 sthen Exp $
 
-MODGCC4_ARCHS ?= ${GCC49_ARCHS}
+MODGCC4_ARCHS ?= ${PORTS_GCC_ARCHS}
 MODGCC4_LANGS ?=
 
 
Index: lang/gcc/8/gcc4.port.mk
===================================================================
RCS file: /cvs/ports/lang/gcc/8/gcc4.port.mk,v
retrieving revision 1.2
diff -u -p -r1.2 gcc4.port.mk
--- lang/gcc/8/gcc4.port.mk     4 Jan 2019 17:29:53 -0000       1.2
+++ lang/gcc/8/gcc4.port.mk     4 Jan 2019 18:08:33 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: gcc4.port.mk,v 1.2 2019/01/04 17:29:53 pascal Exp $
 
-MODGCC4_ARCHS ?= ${GCC49_ARCHS}
+MODGCC4_ARCHS ?= ${PORTS_GCC_ARCHS}
 MODGCC4_LANGS ?=
 
 

Reply via email to