Include header files that are tightly coupled to the compiler: stdatomic.h,

stdfix.h, stdalign.h, and stdnoreturn.h
Ensure these headers are usable on all archs by ensuring that
openbsd-stdint.h is used on all archs.
While here, explicitly add the --disable-libssp flag to configure,
otherwise it will get built and installed.
Sync the PLISTs for these changes.

Prompted and much help and diagnosis on macppc by George Koehler.
Feedback from sthen@ and pascal@

ok pascal@
This commit is contained in:
bcallah 2018-12-14 17:58:03 +00:00
parent 15be97aaf7
commit 52c60e8079
5 changed files with 35 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2018/12/07 18:27:35 naddy Exp $
# $OpenBSD: Makefile,v 1.15 2018/12/14 17:58:03 bcallah Exp $
USE_LLD=No
@ -6,7 +6,7 @@ ONLY_FOR_ARCHS = ${GCC49_ARCHS}
DPB_PROPERTIES = parallel
V = 6.4.0
REVISION = 3
REVISION = 4
FULL_VERSION = $V
FULL_PKGVERSION = $V
@ -138,6 +138,7 @@ CONFIGURE_ARGS += \
--with-system-zlib \
--disable-libmudflap \
--disable-libgomp \
--disable-libssp \
--disable-tls \
--with-gnu-ld \
--with-gnu-as \

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-gcc_config_gcc,v 1.5 2018/11/01 22:09:30 sthen Exp $
$OpenBSD: patch-gcc_config_gcc,v 1.6 2018/12/14 17:58:03 bcallah Exp $
Index: gcc/config.gcc
--- gcc/config.gcc.orig
+++ gcc/config.gcc
@ -32,7 +32,7 @@ Index: gcc/config.gcc
;;
+arm-*-openbsd*)
+ tm_defines="${tm_defines} DEFAULT_FLAG_PIE=1"
+ tm_file="dbxelf.h elfos.h arm/elf.h arm/aout.h arm/openbsd1.h arm/arm.h openbsd.h openbsd-libpthread.h arm/openbsd.h"
+ tm_file="dbxelf.h elfos.h arm/elf.h arm/aout.h arm/openbsd1.h arm/arm.h openbsd.h openbsd-stdint.h openbsd-libpthread.h arm/openbsd.h"
+ extra_options="${extra_options} openbsd.opt"
+ tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
+ set
@ -70,13 +70,13 @@ Index: gcc/config.gcc
;;
+mips64-*-openbsd*)
+ set
+ tm_file="dbxelf.h elfos.h openbsd.h mips/mips.h mips/openbsd.h openbsd-libpthread.h"
+ tm_file="dbxelf.h elfos.h openbsd.h openbsd-stdint.h mips/mips.h mips/openbsd.h openbsd-libpthread.h"
+ tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_64 DEFAULT_FLAG_PIE=1"
+ extra_options="${extra_options} openbsd.opt"
+ ;;
+mips64el-*-openbsd*)
+ set
+ tm_file="dbxelf.h elfos.h openbsd.h mips/mips.h mips/openbsd.h openbsd-libpthread.h"
+ tm_file="dbxelf.h elfos.h openbsd.h openbsd-stdint.h mips/mips.h mips/openbsd.h openbsd-libpthread.h"
+ tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_64 TARGET_ENDIAN_DEFAULT=0 DEFAULT_FLAG_PIE=1"
+ extra_options="${extra_options} openbsd.opt"
+ ;;
@ -89,7 +89,7 @@ Index: gcc/config.gcc
# ;;
+powerpc-*-openbsd*)
+ tm_defines="${tm_defines} DEFAULT_FLAG_PIE=2"
+ tm_file="rs6000/secureplt.h ${tm_file} dbxelf.h elfos.h openbsd.h openbsd-libpthread.h freebsd-spec.h rs6000/sysv4.h rs6000/openbsd.h"
+ tm_file="rs6000/secureplt.h ${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h freebsd-spec.h rs6000/sysv4.h rs6000/openbsd.h"
+ tmake_file="${tmake_file} rs6000/t-openbsd"
+ extra_options="${extra_options} rs6000/sysv4.opt openbsd.opt"
+ ;;

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-gcc_config_t-openbsd,v 1.1 2018/12/14 17:58:03 bcallah Exp $
Make sure to include standard headers that are tightly bound
to the compiler, such as stdatomic.h
Index: gcc/config/t-openbsd
--- gcc/config/t-openbsd.orig
+++ gcc/config/t-openbsd
@@ -1,2 +1,6 @@
# We don't need GCC's own include files.
-USER_H = $(EXTRA_HEADERS)
+USER_H = $(srcdir)/ginclude/stdfix.h \
+ $(srcdir)/ginclude/stdnoreturn.h \
+ $(srcdir)/ginclude/stdalign.h \
+ $(srcdir)/ginclude/stdatomic.h \
+ $(EXTRA_HEADERS)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-c++,v 1.1.1.1 2016/09/04 16:20:22 pascal Exp $
@comment $OpenBSD: PLIST-c++,v 1.2 2018/12/14 17:58:03 bcallah Exp $
@option is-branch
@conflict gcc-libs->=7
@bin bin/ec++
@ -219,6 +219,7 @@ include/c++/${V}/experimental/bits/fs_dir.h
include/c++/${V}/experimental/bits/fs_fwd.h
include/c++/${V}/experimental/bits/fs_ops.h
include/c++/${V}/experimental/bits/fs_path.h
include/c++/${V}/experimental/bits/lfts_config.h
include/c++/${V}/experimental/bits/shared_ptr.h
include/c++/${V}/experimental/bits/string_view.tcc
include/c++/${V}/experimental/chrono

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.7 2018/11/01 22:09:30 sthen Exp $
@comment $OpenBSD: PLIST-main,v 1.8 2018/12/14 17:58:03 bcallah Exp $
@option is-branch
@bin bin/ecpp
@bin bin/egcc
@ -6,6 +6,7 @@
@bin bin/egcc-nm
@bin bin/egcc-ranlib
@bin bin/egcov
@bin bin/egcov-dump
@bin bin/egcov-tool
@bin bin/${CONFIG}-egcc
@bin bin/${CONFIG}-egcc-ar
@ -20,10 +21,15 @@
lib/gcc/
lib/gcc/${CONFIG}/
lib/gcc/${CONFIG}/${V}/
lib/gcc/${CONFIG}/${V}/include/
lib/gcc/${CONFIG}/${V}/include-fixed/
lib/gcc/${CONFIG}/${V}/include-fixed/README
lib/gcc/${CONFIG}/${V}/include-fixed/limits.h
lib/gcc/${CONFIG}/${V}/include-fixed/syslimits.h
lib/gcc/${CONFIG}/${V}/include/stdalign.h
lib/gcc/${CONFIG}/${V}/include/stdatomic.h
lib/gcc/${CONFIG}/${V}/include/stdfix.h
lib/gcc/${CONFIG}/${V}/include/stdnoreturn.h
lib/gcc/${CONFIG}/${V}/install-tools/
lib/gcc/${CONFIG}/${V}/install-tools/fixinc_list
lib/gcc/${CONFIG}/${V}/install-tools/gsyslimits.h
@ -437,6 +443,8 @@ libexec/gcc/${CONFIG}/${V}/plugin/
@bin libexec/gcc/${CONFIG}/${V}/plugin/gengtype
@man man/man1/ecpp.1
@man man/man1/egcc.1
@man man/man1/egcov-dump.1
@man man/man1/egcov-tool.1
@man man/man1/egcov.1
@man man/man7/fsf-funding.7
@man man/man7/gfdl.7