Re: switch armv7 to clang

2018-01-18 Thread Stuart Henderson
On 2018/01/18 21:03, Jeremie Courreges-Anglas wrote:
> +_SYSTEM_VERSION-arm = 1

Hooray for _SYSTEM_VERSION!



Re: switch armv7 to clang

2018-01-18 Thread Jeremie Courreges-Anglas
On Thu, Jan 18 2018, Peter Hessler  wrote:
> On 2018 Jan 18 (Thu) at 19:08:17 +0100 (+0100), Mark Kettenis wrote:
> :I think we are ready to switch.  The procedure is the same as with
> :previous switches.
>
> Here is the corresponding ports diff:

Here's an additional hunk to force ports update.


Index: arch-defines.mk
===
RCS file: /d/cvs/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.46
diff -u -p -p -u -r1.46 arch-defines.mk
--- arch-defines.mk 23 Nov 2017 14:33:21 -  1.46
+++ arch-defines.mk 18 Jan 2018 20:01:19 -
@@ -18,7 +18,7 @@ APM_ARCHS = amd64 i386 loongson macppc s
 BE_ARCHS = hppa m88k mips64 powerpc sparc64
 LE_ARCHS = aarch64 alpha amd64 arm i386 mips64el sh
 LP64_ARCHS = aarch64 alpha amd64 sparc64 mips64 mips64el
-GCC4_ARCHS = alpha arm hppa mips64 mips64el powerpc sh sparc64
+GCC4_ARCHS = alpha hppa mips64 mips64el powerpc sh sparc64
 GCC3_ARCHS = m88k
 # XXX easier for ports that depend on mono
 MONO_ARCHS = amd64 i386
@@ -27,7 +27,7 @@ OCAML_NATIVE_DYNLINK_ARCHS = i386 amd64
 GO_ARCHS = amd64 i386
 
 # arches where the base compiler is clang
-CLANG_ARCHS = aarch64 amd64 i386
+CLANG_ARCHS = aarch64 amd64 arm i386
 # arches using LLVM's linker (ld.lld); others use binutils' ld.bfd
 LLD_ARCHS = aarch64
 
@@ -61,6 +61,7 @@ LIBECXX = estdc++>=17 pthread
 _SYSTEM_VERSION = 0
 _SYSTEM_VERSION-i386 = 1
 _SYSTEM_VERSION-amd64 = 1
+_SYSTEM_VERSION-arm = 1
 _SYSTEM_VERSION-${MACHINE_ARCH} ?= 0
 _SYSTEM_VERSION-${ARCH} ?= 0
 

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: switch armv7 to clang

2018-01-18 Thread Peter Hessler
On 2018 Jan 18 (Thu) at 19:08:17 +0100 (+0100), Mark Kettenis wrote:
:I think we are ready to switch.  The procedure is the same as with
:previous switches.

Here is the corresponding ports diff:

Index: infrastructure/mk/arch-defines.mk
===
RCS file: /cvs/openbsd/ports/infrastructure/mk/arch-defines.mk,v
retrieving revision 1.46
diff -u -p -u -p -r1.46 arch-defines.mk
--- infrastructure/mk/arch-defines.mk   23 Nov 2017 14:33:21 -  1.46
+++ infrastructure/mk/arch-defines.mk   18 Jan 2018 18:17:02 -
@@ -18,7 +18,7 @@ APM_ARCHS = amd64 i386 loongson macppc s
 BE_ARCHS = hppa m88k mips64 powerpc sparc64
 LE_ARCHS = aarch64 alpha amd64 arm i386 mips64el sh
 LP64_ARCHS = aarch64 alpha amd64 sparc64 mips64 mips64el
-GCC4_ARCHS = alpha arm hppa mips64 mips64el powerpc sh sparc64
+GCC4_ARCHS = alpha hppa mips64 mips64el powerpc sh sparc64
 GCC3_ARCHS = m88k
 # XXX easier for ports that depend on mono
 MONO_ARCHS = amd64 i386
@@ -27,7 +27,7 @@ OCAML_NATIVE_DYNLINK_ARCHS = i386 amd64
 GO_ARCHS = amd64 i386
 
 # arches where the base compiler is clang
-CLANG_ARCHS = aarch64 amd64 i386
+CLANG_ARCHS = aarch64 amd64 arm i386
 # arches using LLVM's linker (ld.lld); others use binutils' ld.bfd
 LLD_ARCHS = aarch64
 

-- 
If life is a stage, I want some better lighting.



switch armv7 to clang

2018-01-18 Thread Mark Kettenis
I think we are ready to switch.  The procedure is the same as with
previous switches.  Apply the diff below, run make install in
/usr/src/share/mk, and create the following hard links:

# ln -f /usr/bin/clang /usr/bin/cc
# ln -f /usr/bin/clang++ /usr/bin/c++
# ln -f /usr/bin/clang-cpp /usr/libexec/cpp

Note that between installing new shared libraries and installing new
binaries, sshd won't work, so you won't be able to log in remotely.
Existing connection will stay alive and you can log in on the serial
console.

The problem here is that some of our shared libraries re-export libgcc
symbols that disappear when you compile with clang.  This means that
some ports will also stop working, and will have to be re-built.  Can
the ports people deal with that?

ok?


Index: share/mk/bsd.own.mk
===
RCS file: /cvs/src/share/mk/bsd.own.mk,v
retrieving revision 1.187
diff -u -p -r1.187 bsd.own.mk
--- share/mk/bsd.own.mk 26 Oct 2017 19:08:33 -  1.187
+++ share/mk/bsd.own.mk 18 Jan 2018 17:46:28 -
@@ -16,7 +16,7 @@ SKEY?=yes
 YP?=   yes
 
 CLANG_ARCH=aarch64 amd64 arm i386
-GCC4_ARCH=alpha arm hppa mips64 mips64el powerpc sh sparc64
+GCC4_ARCH=alpha hppa mips64 mips64el powerpc sh sparc64
 GCC3_ARCH=m88k
 
 # m88k: ?
@@ -38,7 +38,7 @@ BUILD_GCC3?=yes
 BUILD_GCC3?=no
 .endif
 .if !empty(GCC4_ARCH:M${_arch}) || ${MACHINE_ARCH} == "amd64" || \
-${MACHINE_ARCH} == "i386"
+${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386"
 BUILD_GCC4?=yes
 .else
 BUILD_GCC4?=no