remove gcc 4.9, no longer hooked up to the build; ok sthen@

This commit is contained in:
naddy 2019-08-10 17:58:17 +00:00
parent dd666787ee
commit c48e5fa246
172 changed files with 0 additions and 15200 deletions

View File

@ -1,307 +0,0 @@
# $OpenBSD: Makefile,v 1.68 2019/04/22 20:50:34 naddy Exp $
ONLY_FOR_ARCHS = ${GCC49_ARCHS}
DPB_PROPERTIES = parallel
V = 4.9.4
REVISION = 19
FULL_VERSION = $V
FULL_PKGVERSION = $V
ADASTRAP_LIBC-amd64 = 92.3
ADASTRAP_LIBM-amd64 = 10.1
ADASTRAP-amd64 = adastrap-amd64-$V-3.tar.xz
ADASTRAP_LIBC-arm = 88.0
ADASTRAP_LIBM-arm = 9.0
ADASTRAP-arm = adastrap-arm-$V-0.tar.xz
ADASTRAP_LIBC-hppa = 89.2
ADASTRAP_LIBM-hppa = 10.0
ADASTRAP-hppa = adastrap-hppa-$V-0.tar.xz
ADASTRAP_LIBC-i386 = 92.8
ADASTRAP_LIBM-i386 = 10.1
ADASTRAP-i386 = adastrap-i386-$V-2.tar.xz
ADASTRAP_LIBC-mips64 = 93.0
ADASTRAP_LIBM-mips64 = 10.1
ADASTRAP-mips64 = adastrap-mips64-$V-2.tar.xz
ADASTRAP_LIBC-powerpc = 89.2
ADASTRAP_LIBM-powerpc = 10.0
ADASTRAP-powerpc = adastrap-powerpc-$V-1.tar.xz
ADASTRAP_LIBC-sparc64 = 89.2
ADASTRAP_LIBM-sparc64 = 10.0
ADASTRAP-sparc64 = adastrap-sparc64-$V-1.tar.xz
PKGNAME-main = gcc-${FULL_PKGVERSION}
PKGNAME-libs = gcc-libs-${FULL_PKGVERSION}
PKGNAME-c++ = g++-${FULL_PKGVERSION}
PKGNAME-f95 = g95-${FULL_PKGVERSION}
PKGNAME-java = gcj-${FULL_PKGVERSION}
PKGNAME-objc = gobjc-${FULL_PKGVERSION}
PKGNAME-ada = gnat-${FULL_PKGVERSION}
PKGSPEC-main = gcc->=4.9,<4.10
SHARED_LIBS = estdc++ 17.1 \
gfortran 6.1 \
gcj 4.1 \
gcj-tools 4.0 \
gij 4.1 \
objc 6.1 \
lto_plugin 3.1 \
go 3.0 \
itm 2.1 \
atomic 1.1 \
quadmath 1.1 \
cilkrts 0.1
PSEUDO_FLAVORS = no_java no_ada full
FLAVOR ?=
ONLY_FOR_ARCHS-ada = amd64 hppa i386 mips64 powerpc sparc64
ONLY_FOR_ARCHS-java = amd64 i386 sparc64
MULTI_PACKAGES = -main -libs -f95 -objc -c++ -java -ada
MAINTAINER = Pascal Stumpf <pascal@stumpf.co>
.include <bsd.port.arch.mk>
DISTNAME = gcc-${FULL_VERSION}
DISTFILES = ${DISTNAME}.tar.bz2
# there's no ecj-4.9.jar
ECJ = ecj-4.5.jar
SUPDISTFILES = ${ADASTRAP-amd64}:2 ${ADASTRAP-arm}:0 ${ADASTRAP-hppa}:0 \
${ADASTRAP-i386}:2 ${ADASTRAP-mips64}:0 ${ADASTRAP-powerpc}:0 \
${ADASTRAP-sparc64}:0 ${ECJ}:1
EXTRACT_ONLY = ${DISTNAME}.tar.bz2
BUILD_DEPENDS += devel/bison \
devel/libexecinfo
.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
BUILD_DEPENDS += textproc/gsed
.endif
TEST_DEPENDS = devel/dejagnu \
devel/autogen \
${BUILD_PKGPATH},-libs>=4.9,<4.10
MASTER_SITES = ${MASTER_SITE_GCC:=releases/gcc-$(FULL_VERSION)/}
MASTER_SITES0 = https://distfiles.stumpf.co/ \
https://spacehopper.org/mirrors/ \
http://distfiles.tmux.org/adastrap/ \
https://distfiles.bsdfrog.org/
MASTER_SITES1 = ftp://sources.redhat.com/pub/java/
MASTER_SITES2 = https://spacehopper.org/mirrors/
LANGS = c,c++,fortran,objc
.if ${BUILD_PACKAGES:M-java}
LANGS := ${LANGS},java
DISTFILES += ${ECJ}:1
BUILD_DEPENDS += archivers/zip>=2.3p0
CONFIGURE_ARGS += --enable-libgcj --without-jar
.endif
.if ${BUILD_PACKAGES:M-ada}
LANGS := ${LANGS},ada
.if ${MACHINE_ARCH} == amd64
DISTFILES += ${ADASTRAP-${MACHINE_ARCH}}:2
.else
DISTFILES += ${ADASTRAP-${MACHINE_ARCH}}:0
.endif
EXTRACT_ONLY += ${ADASTRAP-${MACHINE_ARCH}}
EXTRA_ENV += ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind
CC = ${WRKDIR}/bin/egcc
CXX = ${WRKDIR}/bin/eg++
TEST_DEPENDS += ${BUILD_PKGPATH},-ada
.endif
CONFIGURE_STYLE = gnu
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/gcc
EXTRA_ENV += am_cv_func_iconv=no JAR=no
EXTRA_ENV += ac_cv_prog_M4=/usr/bin/m4
EXTRA_ENV += ac_cv_header_magic_h=no
EXTRA_ENV += lt_cv_path_SED=/usr/bin/sed
EXTRA_ENV += STRIP=/usr/bin/strip
MAKE_FLAGS += ac_cv_path_mkdir=/bin/mkdir
CONFIGURE_ENV += ${EXTRA_ENV}
MAKE_ENV += ${EXTRA_ENV}
# Note: the configure target passes CFLAGS to the configure script anyways.
.if ${MACHINE_ARCH} == "alpha"
CFLAGS = -O1 -g
.else
CFLAGS = -O2 -g
.endif
CONFIGURE_ARGS += \
--verbose \
--program-transform-name=s,^,e, \
--disable-nls \
--with-system-zlib \
--disable-libmudflap \
--disable-libgomp \
--disable-tls \
--with-gnu-ld \
--with-gnu-as \
--enable-threads=posix \
--enable-wchar_t \
--with-gmp="${LOCALBASE}" \
--enable-languages=${LANGS} \
--disable-libstdcxx-pch
# This is needed, as internal cpp is no longer compatible with the
# visible beast
CONFIGURE_ARGS += --enable-cpp
SEPARATE_BUILD = flavored
USE_GMAKE = yes
.if ${FLAVOR:Mfull}
# you shouldn't skip bootstrap unless you know what you're doing
# use bootstrap-lean if you're pressed for space
ALL_TARGET = bootstrap
.else
# skip the stage2/stage3 bullshit under normal circumstances
ALL_TARGET = bootstrap2
.endif
MAKE_FLAGS += libstdc___la_LDFLAGS='-version-info 31:0:0 -lm'
.for _a in ${ONLY_FOR_ARCHS}
PKG_ARGS += -D${_a}=0
.endfor
PKG_ARGS += -D${MACHINE_ARCH}=1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
PKG_ARGS += -DX86=1
.else
PKG_ARGS += -DX86=0
.endif
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "arm" || \
${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sh" || \
${MACHINE_ARCH} == "sparc64"
PKG_ARGS += -DITM=1
.else
PKG_ARGS += -DITM=0
.endif
# depends on __float128
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
PKG_ARGS += -DQUADMATH=1
.else
PKG_ARGS +=-DQUADMATH=0
.endif
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
PKG_ARGS += -DCILKRTS=1
.else
PKG_ARGS += -DCILKRTS=0
.endif
RUN_DEPENDS = ${BUILD_PKGPATH},-main
WANTLIB = c gmp m mpc mpfr z
RUN_DEPENDS-main = ${BUILD_PKGPATH},-libs
RUN_DEPENDS-libs =
WANTLIB-java = ${WANTLIB} pthread
WANTLIB-main = ${WANTLIB}
WANTLIB-ada = ${WANTLIB} pthread util
WANTLIB-libs = m pthread
LIB_DEPENDS += devel/gmp,no_cxx,bootstrap \
devel/mpfr \
devel/libmpc
LIB_DEPENDS-libs =
.if ${MACHINE_ARCH:Mamd64}
CONFIG = x86_64-unknown-openbsd${OSREV}
.endif
post-extract:
.for f in egcc eg++
echo "#! /bin/sh" >${WRKDIR}/bin/$f
echo 'GNAT_ROOT=${WRKDIR}/bootstrap GCC_ROOT=${WRKDIR}/bootstrap LD_LIBRARY_PATH=${WRKDIR}/bootstrap/system-libs exec ${WRKDIR}/bootstrap/bin/$f "$$@"' >>${WRKDIR}/bin/$f
chmod a+x ${WRKDIR}/bin/$f
.endfor
.for f in gnatbind gnatmake gnatlink
echo "#! /bin/sh" >${WRKDIR}/bin/$f
echo 'GNAT_ROOT=${WRKDIR}/bootstrap GCC_ROOT=${WRKDIR}/bootstrap LD_LIBRARY_PATH=${WRKDIR}/bootstrap/system-libs exec ${WRKDIR}/bootstrap/bin/$f "$$@"' >>${WRKDIR}/bin/$f
chmod a+x ${WRKDIR}/bin/$f
.endfor
rm -rf ${WRKDIR}/bootstrap/lib/gcc/*-unknown-openbsd*/$V/include-fixed
ln -sf /usr/bin/nm ${WRKDIR}/bin/enm
echo "# This file automatically generated" >> ${WRKSRC}/libversions
.for l v in ${SHARED_LIBS}
echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> \
${WRKSRC}/libversions
.endfor
.if ${BUILD_PACKAGES:M-java}
cp ${FULLDISTDIR}/${ECJ} ${WRKSRC}/ecj.jar
.endif
.if ${BUILD_PACKAGES:M-ada}
perl -pi -e 's,^#define (_GCOMPILER_LIBCXX_HAVE_GETS) .*,/* #undef $$1 */,' \
${WRKDIR}/bootstrap/include/c++/*/*/bits/c++config.h
.endif
post-configure:
.if ${MACHINE_ARCH} == "alpha"
sed -i -e 's,-O2,-O1,g' ${WRKDIR}/build-alpha/Makefile
.endif
post-install:
.if ${BUILD_PACKAGES:M-ada}
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/adainclude
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/adalib
.endif
.if ${BUILD_PACKAGES:M-f95}
ln -sf ${TRUEPREFIX}/bin/egfortran ${PREFIX}/bin/gfortran
ln -sf ${TRUEPREFIX}/bin/${CONFIG}-egfortran ${PREFIX}/bin/${CONFIG}-gfortran
.endif
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/include
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/include-fixed
chown ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc/${CONFIG}/${V}/libgcc.a
chown ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc/${CONFIG}/${V}/libgcov.a
.include <bsd.port.mk>
ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-ada}.tgz
GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-main}.tgz
GXX_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-c++}.tgz
adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE} ${GXX_PACKAGE}
.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH}) || \
!defined(ADASTRAP_LIBM-${MACHINE_ARCH})
@echo 1>&2 "Error: you must specify libc and libm to bundle"
@exit 1
.else
mkdir -p ${WRKDIR}/prepare/bootstrap/system-libs
cp /usr/lib/libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} \
${WRKDIR}/prepare/bootstrap/system-libs
cp /usr/lib/libm.so.${ADASTRAP_LIBM-${MACHINE_ARCH}} \
${WRKDIR}/prepare/bootstrap/system-libs
cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE}
cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE}
cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GXX_PACKAGE}
rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man,share}
rm -rf ${WRKDIR}/prepare/bootstrap/lib/gcc/*-unknown-openbsd*/$V/include-fixed
if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \
fgrep libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} >/dev/null; then \
echo 1>&2 "Error: adastrap egcc linked against unbundled libc"; \
exit 1; \
fi
if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \
fgrep libm.so.${ADASTRAP_LIBM-${MACHINE_ARCH}} >/dev/null; then \
echo 1>&2 "Error: adastrap egcc linked against unbundled libm"; \
exit 1; \
fi
cd ${WRKDIR}/prepare && tar cf - bootstrap | \
xz > ${FULLDISTDIR}/${ADASTRAP-${MACHINE_ARCH}}
.endif

View File

@ -1,18 +0,0 @@
SHA256 (gcc/adastrap-amd64-4.9.4-3.tar.xz) = vrCm3mzYUehFSEsLSGlYR1zq/efQVaYHJ9F5cbvvC5A=
SHA256 (gcc/adastrap-arm-4.9.4-0.tar.xz) = sadBk8tP/65RDDIHlWE1yo9MnSUP/44Ou9064RXonto=
SHA256 (gcc/adastrap-hppa-4.9.4-0.tar.xz) = C2yoZ9oN+iQf3EzeT06giRHDB949aRjrDv7Vh9kEIb8=
SHA256 (gcc/adastrap-i386-4.9.4-2.tar.xz) = 6a++02Zdg50jp/xP8+tL9IJnBKCO2k2B+DV85v/j9Kk=
SHA256 (gcc/adastrap-mips64-4.9.4-2.tar.xz) = +3RiYW0JWRoL4gF/G0mTvv/JXNqVC5nJJJ/7WAv5JUc=
SHA256 (gcc/adastrap-powerpc-4.9.4-1.tar.xz) = 3LLPykbSkui/1w0YBBx/DsGPqTEdC3G/nJEKBIw8ntc=
SHA256 (gcc/adastrap-sparc64-4.9.4-1.tar.xz) = OC/drODqyO0y50oepYzuHubnCWL2dHZBxLH48UFzTMM=
SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E=
SHA256 (gcc/gcc-4.9.4.tar.bz2) = bBHSks0BspT5+EyaWcIw2A6eSkflxjVfBGuzbU81gJI=
SIZE (gcc/adastrap-amd64-4.9.4-3.tar.xz) = 39027236
SIZE (gcc/adastrap-arm-4.9.4-0.tar.xz) = 31142168
SIZE (gcc/adastrap-hppa-4.9.4-0.tar.xz) = 32204428
SIZE (gcc/adastrap-i386-4.9.4-2.tar.xz) = 39278204
SIZE (gcc/adastrap-mips64-4.9.4-2.tar.xz) = 33068900
SIZE (gcc/adastrap-powerpc-4.9.4-1.tar.xz) = 33755800
SIZE (gcc/adastrap-sparc64-4.9.4-1.tar.xz) = 31077052
SIZE (gcc/ecj-4.5.jar) = 1470676
SIZE (gcc/gcc-4.9.4.tar.bz2) = 90097606

View File

@ -1,92 +0,0 @@
# $OpenBSD: gcc4.port.mk,v 1.11 2019/01/04 17:29:53 pascal Exp $
MODGCC4_ARCHS ?= ${GCC49_ARCHS}
MODGCC4_LANGS ?=
.if ${MODGCC4_LANGS:L} != "java" && !${MODGCC4_LANGS:L:Mc}
# Always include support for this
# unless only java is needed
MODGCC4_LANGS += c
.endif
_MODGCC4_OKAY = c c++ java fortran
.for _l in ${MODGCC4_LANGS:L}
. if !${_MODGCC4_OKAY:M${_l}}
ERRORS += "Fatal: unknown language ${_l}"
. endif
.endfor
_MODGCC4_ARCH_USES = No
.for _i in ${MODGCC4_ARCHS}
. if !empty(MACHINE_ARCH:M${_i})
_MODGCC4_ARCH_USES = Yes
. endif
.endfor
COMPILER_VERSION ?= gcc2
_MODGCC4_LINKS =
MODGCC4STDCPP = estdc++
MODGCC4_CPPLIBDEP = lang/gcc/4.9,-libs>=4.9,<4.10
MODGCC4_CPPDEP = lang/gcc/4.9,-c++>=4.9,<4.10
MODGCC4_CPPWANTLIB = estdc++>=17
MODGCC4_ATOMICWANTLIB = atomic
MODGCC4_FORTRANLIBDEP = lang/gcc/4.9,-libs>=4.9,<4.10
MODGCC4_FORTRANDEP = lang/gcc/4.9,-f95>=4.9,<4.10
MODGCC4_FORTRANWANTLIB = gfortran>=3
# XXX sync with Makefile
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
MODGCC4_FORTRANWANTLIB += quadmath
.endif
.if ${_MODGCC4_ARCH_USES:L} == "yes"
. if ${MODGCC4_LANGS:L:Mc}
BUILD_DEPENDS += lang/gcc/4.9>=4.9,<4.10
# XXX ports-clang already defines this
. if !${COMPILER_LINKS:Mgcc}
COMPILER_LINKS += gcc ${LOCALBASE}/bin/egcc cc ${LOCALBASE}/bin/egcc
. endif
. endif
. if ${MODGCC4_LANGS:L:Mc++}
BUILD_DEPENDS += ${MODGCC4_CPPDEP}
LIB_DEPENDS += ${MODGCC4_CPPLIBDEP}
WANTLIB += ${MODGCC4_CPPWANTLIB}
# XXX ports-clang already defines this
. if !${COMPILER_LINKS:Mg++}
COMPILER_LINKS += c++ ${LOCALBASE}/bin/eg++ g++ ${LOCALBASE}/bin/eg++
. endif
. endif
. if ${MODGCC4_LANGS:L:Mfortran}
BUILD_DEPENDS += ${MODGCC4_FORTRANDEP}
WANTLIB += ${MODGCC4_FORTRANWANTLIB}
LIB_DEPENDS += ${MODGCC4_FORTRANLIBDEP}
COMPILER_LINKS += gfortran ${LOCALBASE}/bin/egfortran
. endif
. if ${MODGCC4_LANGS:L:Mjava}
BUILD_DEPENDS += lang/gcc/4.9,-java>=4.9,<4.10
MODGCC4_GCJWANTLIB = gcj
MODGCC4_GCJLIBDEP = lang/gcc/4.9,-java>=4.9,<4.10
COMPILER_LINKS += gcj ${LOCALBASE}/bin/egcj
_MODGCC4_LINKS += gcjh gjar gij
. endif
#. if ${MODGCC4_LANGS:L:Mgo}
#BUILD_DEPENDS += lang/gcc/4.9,-go>=4.9,<4.10
#WANTLIB += go
#LIB_DEPENDS += lang/gcc/4.9,-go>=4.9,<4.10
#COMPILER_LINKS += gccgo ${LOCALBASE}/bin/egccgo
#. endif
.endif
.if !empty(_MODGCC4_LINKS)
. for _src in ${_MODGCC4_LINKS}
MODGCC4_post-patch += ln -sf ${LOCALBASE}/bin/e${_src} ${WRKDIR}/bin/${_src};
. endfor
.endif

View File

@ -1,282 +0,0 @@
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- Makefile.in.orig Fri Apr 4 22:53:48 2014
+++ Makefile.in Wed Apr 23 12:48:58 2014
@@ -2369,7 +2369,7 @@ install:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) -j1 installdirs install-host install-target
.PHONY: install-host-nogcc
install-host-nogcc: \
@@ -2662,7 +2662,7 @@ configure-build-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -2718,7 +2718,7 @@ configure-build-bison:
srcdiroption="--srcdir=$${topdir}/bison"; \
libsrcdir="$$s/bison"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -2774,7 +2774,7 @@ configure-build-flex:
srcdiroption="--srcdir=$${topdir}/flex"; \
libsrcdir="$$s/flex"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -2830,7 +2830,7 @@ configure-build-m4:
srcdiroption="--srcdir=$${topdir}/m4"; \
libsrcdir="$$s/m4"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -2886,7 +2886,7 @@ configure-build-texinfo:
srcdiroption="--srcdir=$${topdir}/texinfo"; \
libsrcdir="$$s/texinfo"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -2942,7 +2942,7 @@ configure-build-fixincludes:
srcdiroption="--srcdir=$${topdir}/fixincludes"; \
libsrcdir="$$s/fixincludes"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -31244,7 +31244,7 @@ configure-target-libstdc++-v3:
srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
libsrcdir="$$s/libstdc++-v3"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -32218,7 +32218,7 @@ configure-target-libsanitizer:
srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
libsrcdir="$$s/libsanitizer"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -33192,7 +33192,7 @@ configure-target-libvtv:
srcdiroption="--srcdir=$${topdir}/libvtv"; \
libsrcdir="$$s/libvtv"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -34167,7 +34167,7 @@ configure-target-libcilkrts:
srcdiroption="--srcdir=$${topdir}/libcilkrts"; \
libsrcdir="$$s/libcilkrts"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -34624,7 +34624,7 @@ configure-target-libssp:
srcdiroption="--srcdir=$${topdir}/libssp"; \
libsrcdir="$$s/libssp"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -35081,7 +35081,7 @@ configure-target-newlib:
srcdiroption="--srcdir=$${topdir}/newlib"; \
libsrcdir="$$s/newlib"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -35537,7 +35537,7 @@ configure-target-libgcc:
srcdiroption="--srcdir=$${topdir}/libgcc"; \
libsrcdir="$$s/libgcc"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -36507,7 +36507,7 @@ configure-target-libbacktrace:
srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
libsrcdir="$$s/libbacktrace"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -36964,7 +36964,7 @@ configure-target-libquadmath:
srcdiroption="--srcdir=$${topdir}/libquadmath"; \
libsrcdir="$$s/libquadmath"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -37421,7 +37421,7 @@ configure-target-libgfortran:
srcdiroption="--srcdir=$${topdir}/libgfortran"; \
libsrcdir="$$s/libgfortran"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -37878,7 +37878,7 @@ configure-target-libobjc:
srcdiroption="--srcdir=$${topdir}/libobjc"; \
libsrcdir="$$s/libobjc"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -38335,7 +38335,7 @@ configure-target-libgo:
srcdiroption="--srcdir=$${topdir}/libgo"; \
libsrcdir="$$s/libgo"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -38792,7 +38792,7 @@ configure-target-libtermcap:
srcdiroption="--srcdir=$${topdir}/libtermcap"; \
libsrcdir="$$s/libtermcap"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -39184,7 +39184,7 @@ configure-target-winsup:
srcdiroption="--srcdir=$${topdir}/winsup"; \
libsrcdir="$$s/winsup"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -39641,7 +39641,7 @@ configure-target-libgloss:
srcdiroption="--srcdir=$${topdir}/libgloss"; \
libsrcdir="$$s/libgloss"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -40093,7 +40093,7 @@ configure-target-libffi:
srcdiroption="--srcdir=$${topdir}/libffi"; \
libsrcdir="$$s/libffi"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -40540,7 +40540,7 @@ configure-target-libjava:
srcdiroption="--srcdir=$${topdir}/libjava"; \
libsrcdir="$$s/libjava"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} $(EXTRA_CONFIGARGS_LIBJAVA) \
|| exit 1
@@ -40997,7 +40997,7 @@ configure-target-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -41454,7 +41454,7 @@ configure-target-boehm-gc:
srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
libsrcdir="$$s/boehm-gc"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -41911,7 +41911,7 @@ configure-target-rda:
srcdiroption="--srcdir=$${topdir}/rda"; \
libsrcdir="$$s/rda"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -42368,7 +42368,7 @@ configure-target-libada:
srcdiroption="--srcdir=$${topdir}/libada"; \
libsrcdir="$$s/libada"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -42824,7 +42824,7 @@ configure-target-libgomp:
srcdiroption="--srcdir=$${topdir}/libgomp"; \
libsrcdir="$$s/libgomp"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -43799,7 +43799,7 @@ configure-target-libitm:
srcdiroption="--srcdir=$${topdir}/libitm"; \
libsrcdir="$$s/libitm"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1
@@ -44256,7 +44256,7 @@ configure-target-libatomic:
srcdiroption="--srcdir=$${topdir}/libatomic"; \
libsrcdir="$$s/libatomic"; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--target=${target_alias} $${srcdiroption} \
|| exit 1

View File

@ -1,51 +0,0 @@
$OpenBSD: patch-boehm-gc_configure,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/configure.orig Sun Dec 1 23:39:57 2013
+++ boehm-gc/configure Mon Dec 2 12:20:01 2013
@@ -10684,7 +10684,7 @@ netbsd*)
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -14409,7 +14409,7 @@ openbsd*)
*) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
@@ -14785,6 +14785,11 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5
$as_echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;}
;;
+ *-*-openbsd*)
+ $as_echo "#define GC_OPENBSD_THREADS 1" >>confdefs.h
+ THREADLIBS=-pthread
+ INCLUDES="$INCLUDES -pthread"
+ ;;
*-*-kfreebsd*-gnu)
$as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h
@@ -14914,7 +14919,6 @@ else
POWERPC_DARWIN_FALSE=
fi
-
# Darwin needs a few extra special tests to deal with variation in the
# system headers.
case "$host" in
@@ -15224,6 +15228,9 @@ $as_echo "#define DATASTART_IS_ETEXT 1" >>confdefs.h
;;
sparc-*-netbsd*)
machdep="sparc_netbsd_mach_dep.lo"
+ ;;
+ sparc*-*-openbsd*)
+ machdep="sparc_mach_dep.lo"
;;
sparc-sun-solaris2.3)
machdep="sparc_mach_dep.lo"

View File

@ -1,50 +0,0 @@
$OpenBSD: patch-boehm-gc_dyn_load_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/dyn_load.c.orig Sun Nov 4 23:56:02 2012
+++ boehm-gc/dyn_load.c Fri Feb 8 13:18:49 2013
@@ -61,6 +61,7 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
+ !(defined(OPENBSD) && defined(__ELF__)) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
@@ -100,9 +101,9 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+ (defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# include <stddef.h>
-# include <elf.h>
# include <link.h>
#endif
@@ -116,7 +117,7 @@
# define ElfW(type) Elf64_##type
# endif
# else
-# ifdef NETBSD
+# if defined(NETBSD) || defined(OPENBSD)
# if ELFSIZE == 32
# define ElfW(type) Elf32_##type
# else
@@ -365,6 +366,7 @@ void GC_register_dynamic_libraries()
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+ (defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@@ -473,6 +475,10 @@ GC_bool GC_register_main_static_data()
# if (defined(FREEBSD) && __FreeBSD__ >= 7)
/* On the FreeBSD system, any target system at major version 7 shall */
/* have dl_iterate_phdr; therefore, we need not make it weak as above. */
+#define HAVE_DL_ITERATE_PHDR
+#endif
+
+#if defined(OPENBSD)
#define HAVE_DL_ITERATE_PHDR
#endif

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-boehm-gc_include_gc_config_h_in,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/include/gc_config.h.in.orig Sat Nov 12 09:58:20 2011
+++ boehm-gc/include/gc_config.h.in Sat Nov 12 09:58:43 2011
@@ -30,6 +30,9 @@
/* support FreeBSD threads */
#undef GC_FREEBSD_THREADS
+/* support OpenBSD threads */
+#undef GC_OPENBSD_THREADS
+
/* include support for gcj */
#undef GC_GCJ_SUPPORT

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-boehm-gc_include_gc_config_macros_h,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/include/gc_config_macros.h.orig Sun Nov 4 23:56:02 2012
+++ boehm-gc/include/gc_config_macros.h Sat Jan 12 13:27:06 2013
@@ -22,7 +22,7 @@
defined(GC_GNU_THREADS) || \
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
- defined(GC_AIX_THREADS) || \
+ defined(GC_AIX_THREADS) || defined(GC_OPENBSD_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
# define GC_PTHREADS
# endif
@@ -55,6 +55,10 @@
# endif
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
# define GC_FREEBSD_THREADS
+# define GC_PTHREADS
+# endif
+# if !defined(GC_PTHREADS) && defined(__OpenBSD__)
+# define GC_OPENBSD_THREADS
# define GC_PTHREADS
# endif
# if defined(DGUX) && (defined(i386) || defined(__i386__))

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-boehm-gc_include_gc_pthread_redirects_h,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/include/gc_pthread_redirects.h.orig Tue Aug 22 00:07:30 2006
+++ boehm-gc/include/gc_pthread_redirects.h Tue Nov 22 14:08:19 2011
@@ -52,7 +52,7 @@
int GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr,
void *(*start_routine)(void *), void *arg);
-#ifndef GC_DARWIN_THREADS
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
int GC_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
#endif
int GC_pthread_join(pthread_t thread, void **retval);
@@ -72,8 +72,11 @@
# define pthread_join GC_pthread_join
# define pthread_detach GC_pthread_detach
-#ifndef GC_DARWIN_THREADS
+#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
# define pthread_sigmask GC_pthread_sigmask
+#endif
+
+#ifndef GC_DARWIN_THREADS
# define dlopen GC_dlopen
#endif

View File

@ -1,345 +0,0 @@
$OpenBSD: patch-boehm-gc_include_private_gcconfig_h,v 1.2 2016/03/09 18:45:52 jasper Exp $
--- boehm-gc/include/private/gcconfig.h.orig Sat Dec 21 21:42:39 2013
+++ boehm-gc/include/private/gcconfig.h Fri Feb 14 20:24:52 2014
@@ -69,7 +69,7 @@
# endif
# if defined(__arm__) || defined(__thumb__)
# define ARM32
-# if !defined(LINUX) && !defined(NETBSD)
+# if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD)
# define NOSYS
# define mach_type_known
# endif
@@ -84,14 +84,18 @@
# define HP
# define mach_type_known
# endif
-# if defined(OPENBSD) && defined(m68k)
-# define M68K
-# define mach_type_known
-# endif
# if defined(OPENBSD) && defined(__sparc__)
# define SPARC
# define mach_type_known
# endif
+# if defined(OPENBSD) && defined(__arm__)
+# define ARM32
+# define mach_type_known
+# endif
+# if defined(OPENBSD) && defined(__sh__)
+# define SH
+# define mach_type_known
+# endif
# if defined(NETBSD) && (defined(m68k) || defined(__m68k__))
# define M68K
# define mach_type_known
@@ -126,7 +130,7 @@
# if defined(nec_ews) || defined(_nec_ews)
# define EWS4800
# endif
-# if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD)
+# if !defined(LINUX) && !defined(EWS4800) && !defined(NETBSD) && !defined(OPENBSD)
# if defined(ultrix) || defined(__ultrix)
# define ULTRIX
# else
@@ -217,7 +221,7 @@
# if defined(_PA_RISC1_0) || defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \
|| defined(hppa) || defined(__hppa__)
# define HP_PA
-# if !defined(LINUX) && !defined(HPUX)
+# if !defined(LINUX) && !defined(HPUX) && !defined(OPENBSD)
# define HPUX
# endif
# define mach_type_known
@@ -238,6 +242,10 @@
# define I386
# define mach_type_known
# endif
+# if defined(OPENBSD) && defined(__amd64)
+# define X86_64
+# define mach_type_known
+# endif
# if defined(LINUX) && defined(__x86_64__)
# define X86_64
# define mach_type_known
@@ -313,6 +321,11 @@
# define MACOS
# define mach_type_known
# endif
+# if defined(__OpenBSD__) && defined(__powerpc__)
+# define POWERPC
+# define OPENBSD
+# define mach_type_known
+# endif
# if defined(macosx) || (defined(__APPLE__) && defined(__MACH__))
# define DARWIN
# if defined(__ppc__) || defined(__ppc64__)
@@ -663,18 +676,6 @@
# ifdef M68K
# define MACH_TYPE "M68K"
# define ALIGNMENT 2
-# ifdef OPENBSD
-# define OS_TYPE "OPENBSD"
-# define HEURISTIC2
-# ifdef __ELF__
-# define DATASTART GC_data_start
-# define DYNAMIC_LOADING
-# else
- extern char etext[];
-# define DATASTART ((ptr_t)(etext))
-# endif
-# define USE_GENERIC_PUSH_REGS
-# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
# define HEURISTIC2
@@ -848,6 +849,24 @@
should be looked into some more */
# define NO_PTHREAD_TRYLOCK
# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define ALIGNMENT 4
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
+# endif
# ifdef FREEBSD
# if defined(__powerpc64__)
# define ALIGNMENT 8
@@ -1003,9 +1022,20 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
-# define STACKBOTTOM ((ptr_t) 0xf8000000)
- extern int etext[];
-# define DATASTART ((ptr_t)(etext))
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
# endif
# ifdef NETBSD
# define OS_TYPE "NETBSD"
@@ -1253,6 +1283,20 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
@@ -1288,7 +1332,7 @@
# ifdef BSDI
# define OS_TYPE "BSDI"
# endif
-# if defined(OPENBSD) || defined(NETBSD) \
+# if defined(NETBSD) \
|| defined(THREE86BSD) || defined(BSDI)
# define HEURISTIC2
extern char etext[];
@@ -1482,6 +1526,24 @@
# define STACKBOTTOM ((ptr_t) 0x7ffff000)
# endif /* _ELF_ */
# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define ALIGNMENT 4
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int _fdata[];
+# define DATASTART ((ptr_t)(_fdata))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
+# endif
# endif
# ifdef RS6000
@@ -1529,7 +1591,7 @@
# define ALIGNMENT 4
# define ALIGN_DOUBLE
# endif
-# if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS)
+# if !defined(GC_HPUX_THREADS) && !defined(GC_LINUX_THREADS) && !defined(OPENBSD)
# ifndef LINUX /* For now. */
# define MPROTECT_VDB
# endif
@@ -1581,6 +1643,23 @@
extern int _end[];
# define DATAEND (&_end)
# endif /* LINUX */
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
+# endif
# endif /* HP_PA */
# ifdef ALPHA
@@ -1605,15 +1684,21 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
-# define HEURISTIC2
-# ifdef __ELF__ /* since OpenBSD/Alpha 2.9 */
-# define DATASTART GC_data_start
-# define ELFCLASS32 32
-# define ELFCLASS64 64
-# define ELF_CLASS ELFCLASS64
-# else /* ECOFF, until OpenBSD/Alpha 2.7 */
-# define DATASTART ((ptr_t) 0x140000000)
-# endif
+# define ELF_CLASS ELFCLASS64
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
@@ -1793,6 +1878,7 @@
# ifdef CX_UX
# define OS_TYPE "CX_UX"
# define DATASTART ((((word)etext + 0x3fffff) & ~0x3fffff) + 0x10000)
+# define STACKBOTTOM ((char*)0xf0000000) /* determined empirically */
# endif
# ifdef DGUX
# define OS_TYPE "DGUX"
@@ -1929,6 +2015,24 @@
# define OS_TYPE "MSWINCE"
# define DATAEND /* not needed */
# endif
+# ifdef OPENBSD
+# define ALIGNMENT 4
+# define OS_TYPE "OPENBSD"
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
+# endif
# ifdef NOSYS
/* __data_start is usually defined in the target linker script. */
extern int __data_start[];
@@ -1976,6 +2080,23 @@
# define USE_GENERIC_PUSH_REGS
# define DYNAMIC_LOADING
# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
+# endif
# endif
# ifdef SH4
@@ -2013,6 +2134,24 @@
# endif
# ifndef HBLKSIZE
# define HBLKSIZE 4096
+# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# define ELF_CLASS ELFCLASS64
+# define SIG_SUSPEND SIGXFSZ
+# define SIG_THR_RESTART SIGXCPU
+# ifndef GC_OPENBSD_THREADS
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# define STACKBOTTOM USRSTACK
+# endif
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+ extern char _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
+# define USE_MMAP
+# define USE_MMAP_ANON
# endif
# define CACHE_LINE_SIZE 64
# define USE_GENERIC_PUSH_REGS

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-boehm-gc_mach_dep_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/mach_dep.c.orig Wed Jan 25 04:03:14 2006
+++ boehm-gc/mach_dep.c Tue Nov 22 14:12:40 2011
@@ -27,7 +27,7 @@
# endif
# endif
-#if defined(RS6000) || defined(POWERPC)
+#if (defined(RS6000) || defined(POWERPC)) && !defined(OPENBSD)
# include <ucontext.h>
#endif
@@ -417,7 +417,7 @@ ptr_t arg;
/* the stack. */
__builtin_unwind_init();
# else /* !HAVE_BUILTIN_UNWIND_INIT */
-# if defined(RS6000) || defined(POWERPC)
+# if (defined(RS6000) || defined(POWERPC)) && !defined(OPENBSD)
/* FIXME: RS6000 means AIX. */
/* This should probably be used in all Posix/non-gcc */
/* settings. We defer that change to minimize risk. */

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-boehm-gc_misc_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/misc.c.orig Fri Feb 8 13:23:49 2013
+++ boehm-gc/misc.c Fri Feb 8 13:24:05 2013
@@ -660,7 +660,7 @@ void GC_init_inner()
# if defined(SEARCH_FOR_DATA_START)
GC_init_linux_data_start();
# endif
-# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
+# if defined(NETBSD) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \

View File

@ -1,176 +0,0 @@
$OpenBSD: patch-boehm-gc_os_dep_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/os_dep.c.orig Wed Mar 6 16:08:58 2013
+++ boehm-gc/os_dep.c Fri Mar 22 22:19:18 2013
@@ -380,7 +380,7 @@ static void *tiny_sbrk(ptrdiff_t increment)
#define sbrk tiny_sbrk
# endif /* ECOS */
-#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
+#if defined(NETBSD) && defined(__ELF__)
ptr_t GC_data_start;
void GC_init_netbsd_elf()
@@ -393,6 +393,86 @@ static void *tiny_sbrk(ptrdiff_t increment)
}
#endif
+#if defined(OPENBSD)
+ static struct sigaction old_segv_act;
+ sigjmp_buf GC_jmp_buf_openbsd;
+
+ /*ARGSUSED*/
+ void GC_fault_handler_openbsd(int sig)
+ {
+ siglongjmp(GC_jmp_buf_openbsd, 1);
+ }
+
+ /* Return the first nonaddressible location > p or bound */
+ /* Requires allocation lock. */
+ ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
+ {
+ static volatile ptr_t result;
+ /* Safer if static, since otherwise it may not be */
+ /* preserved across the longjmp. Can safely be */
+ /* static since it's only called with the */
+ /* allocation lock held. */
+ struct sigaction act;
+ size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+
+ GC_ASSERT(I_HOLD_LOCK());
+
+ act.sa_handler = GC_fault_handler_openbsd;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = SA_NODEFER | SA_RESTART;
+ sigaction(SIGSEGV, &act, &old_segv_act);
+
+ if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
+ result = (ptr_t)(((word)(p)) & ~(pgsz-1));
+ for (;;) {
+ result += pgsz;
+ if (result >= bound) {
+ result = bound;
+ break;
+ }
+ GC_noop1((word)(*result));
+ }
+ }
+
+ sigaction(SIGSEGV, &old_segv_act, 0);
+
+ return(result);
+ }
+
+ /* Return first addressable location > p or bound */
+ /* Requires allocation lock. */
+ ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
+ {
+ static volatile ptr_t result;
+ struct sigaction act;
+ size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
+ static volatile int firstpass;
+
+ GC_ASSERT(I_HOLD_LOCK());
+
+ act.sa_handler = GC_fault_handler_openbsd;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = SA_NODEFER | SA_RESTART;
+ sigaction(SIGSEGV, &act, &old_segv_act);
+
+ firstpass = 1;
+ result = (ptr_t)(((word)(p)) & ~(pgsz-1));
+ if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
+ firstpass = 0;
+ result += pgsz;
+ if (result >= bound) {
+ result = bound;
+ } else
+ GC_noop1((word)(*result));
+ }
+
+ sigaction(SIGSEGV, &old_segv_act, 0);
+
+ return(result);
+ }
+#endif
+
+
# ifdef OS2
# include <stddef.h>
@@ -1057,7 +1137,8 @@ ptr_t GC_get_stack_base()
#endif /* GC_SOLARIS_THREADS */
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
- && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS)
+ && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
+ && !defined(GC_OPENBSD_THREADS)
ptr_t GC_get_stack_base()
{
@@ -1121,6 +1202,25 @@ ptr_t GC_get_stack_base()
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
+#if defined(GC_OPENBSD_THREADS)
+
+/* Find the stack using pthread_stackseg_np() */
+
+# include <sys/signal.h>
+# include <pthread.h>
+# include <pthread_np.h>
+
+#define HAVE_GET_STACK_BASE
+
+ptr_t GC_get_stack_base()
+{
+ stack_t stack;
+ pthread_stackseg_np(pthread_self(), &stack);
+ return stack.ss_sp;
+}
+#endif /* GC_OPENBSD_THREADS */
+
+
/*
* Register static data segment(s) as roots.
* If more data segments are added later then they need to be registered
@@ -1492,6 +1592,32 @@ int * etext_addr;
#else /* !OS2 && !Windows && !AMIGA */
+#if defined(OPENBSD)
+
+/*
+ * Depending on arch alignment there can be multiple holes
+ * between DATASTART & DATAEND. Scan from DATASTART - DATAEND
+ * and register each region.
+ */
+void GC_register_data_segments(void)
+{
+ ptr_t region_start, region_end;
+
+ region_start = DATASTART;
+
+ for(;;) {
+ region_end = GC_find_limit_openbsd(region_start, DATAEND);
+ GC_add_roots_inner(region_start, region_end, FALSE);
+ if (region_end < DATAEND)
+ region_start = GC_skip_hole_openbsd(region_end, DATAEND);
+ else
+ break;
+ }
+}
+
+# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
+
+
void GC_register_data_segments()
{
# if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
@@ -1549,6 +1675,7 @@ void GC_register_data_segments()
/* change. */
}
+# endif /* ! OPENBSD */
# endif /* ! AMIGA */
# endif /* ! MSWIN32 && ! MSWINCE*/
# endif /* ! OS2 */

View File

@ -1,43 +0,0 @@
$OpenBSD: patch-boehm-gc_pthread_support_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/pthread_support.c.orig Sun Nov 4 23:56:02 2012
+++ boehm-gc/pthread_support.c Fri Feb 8 18:37:12 2013
@@ -118,6 +118,10 @@
# include <fcntl.h>
# include <signal.h>
+#if defined(GC_OPENBSD_THREADS)
+# include <pthread_np.h>
+#endif
+
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_semaphore.h"
#else
@@ -884,7 +888,8 @@ void GC_thr_init()
GC_nprocs = pthread_num_processors_np();
# endif
# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
- || defined(GC_SOLARIS_PTHREADS) || defined(GC_GNU_THREADS)
+ || defined(GC_SOLARIS_PTHREADS) || defined(GC_GNU_THREADS) \
+ || defined(GC_OPENBSD_THREADS)
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
@@ -970,7 +975,6 @@ void GC_init_parallel()
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t fudged_set;
-
if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) {
fudged_set = *set;
sigdelset(&fudged_set, SIG_SUSPEND);
@@ -1156,6 +1160,10 @@ GC_PTR GC_get_thread_stack_base()
return stack_addr;
# endif
+# elif defined(GC_OPENBSD_THREADS)
+ stack_t stack;
+ pthread_stackseg_np(pthread_self(), &stack);
+ return stack.ss_sp;
# else
# ifdef DEBUG_THREADS
GC_printf0("Can not determine stack base for attached thread");

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-boehm-gc_threadlibs_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- boehm-gc/threadlibs.c.orig Sun Nov 4 23:56:02 2012
+++ boehm-gc/threadlibs.c Sat Jan 12 13:27:07 2013
@@ -16,6 +16,9 @@ int main()
|| defined(GC_GNU_THREADS)
printf("-lpthread\n");
# endif
+# if defined(GC_OPENBSD_THREADS)
+ printf("-pthread\n");
+# endif
# if defined(GC_FREEBSD_THREADS)
# if (__FREEBSD_version >= 500000)
printf("-lpthread\n");

View File

@ -1,66 +0,0 @@
$OpenBSD: patch-configure,v 1.3 2018/03/16 00:52:35 sthen Exp $
Last hunk: the check for Ada bootstrap fails if there's any output on
stdout/stderr, which occurs if bootstrap copies of system libs don't
match base system libs (e.g. libm minor bump was causing problems
with this). Hack around it for now, but can the bootstrap be improved
to avoid the warning?
Index: configure
--- configure.orig
+++ configure
@@ -2762,8 +2762,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools"
# libgcj represents the runtime libraries only used by gcj.
-libgcj="target-libffi \
- target-zlib \
+libgcj="target-zlib \
target-libjava"
# these libraries are built for the target environment, and are built after
@@ -2784,6 +2783,7 @@ target_libraries="target-libgcc \
target-libquadmath \
target-libgfortran \
target-boehm-gc \
+ target-libffi \
${libgcj} \
target-libobjc \
target-libada \
@@ -3095,7 +3095,7 @@ fi
# Save it here so that, even in case of --enable-libgcj, if the Java
# front-end isn't enabled, we still get libgcj disabled.
-libgcj_saved=$libgcj
+libgcj_saved="target-libffi ${libgcj}"
case $enable_libgcj in
yes)
# If we reset it here, it won't get added to noconfigdirs in the
@@ -3106,7 +3106,7 @@ yes)
no)
# Make sure we get it printed in the list of not supported target libs.
# Don't disable libffi, though, other languages use it.
- noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
+ noconfigdirs="$noconfigdirs ${libgcj}"
# Clear libgcj_saved so that even if java is enabled libffi won't be
# built.
libgcj_saved=
@@ -3336,6 +3336,8 @@ case "${target}" in
;;
powerpc64-*-freebsd*)
;;
+ powerpc-*-openbsd*)
+ ;;
powerpc*-*-rtems*)
;;
s390-*-* | s390x-*-*)
@@ -5210,8 +5212,7 @@ acx_cv_cc_gcc_supports_ada=no
# Other compilers, like HP Tru64 UNIX cc, exit successfully when
# given a .adb file, but produce no object file. So we must check
# if an object file was really produced to guard against this.
-errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
-if test x"$errors" = x && test -f conftest.$ac_objext; then
+if ${CC} -c conftest.adb && test -f conftest.$ac_objext; then
acx_cv_cc_gcc_supports_ada=yes
fi
rm -f conftest.*

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-contrib_texi2pod_pl,v 1.1 2019/04/16 15:35:30 naddy Exp $
Index: contrib/texi2pod.pl
--- contrib/texi2pod.pl.orig
+++ contrib/texi2pod.pl
@@ -316,7 +316,7 @@ while(<$inf>) {
@columns = ();
for $column (split (/\s*\@tab\s*/, $1)) {
# @strong{...} is used a @headitem work-alike
- $column =~ s/^\@strong{(.*)}$/$1/;
+ $column =~ s/^\@strong\{(.*)\}$/$1/;
push @columns, $column;
}
$_ = "\n=item ".join (" : ", @columns)."\n";

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-fixincludes_fixincl_x,v 1.2 2016/09/01 17:30:33 pascal Exp $
--- fixincludes/fixincl.x.orig Mon Feb 1 21:27:47 2016
+++ fixincludes/fixincl.x Sat Aug 6 19:19:03 2016
@@ -6386,11 +6386,11 @@ static const char* apzSolaris_Complex_CxxPatch[] = { s
"-e", "/#if[ \t]*!defined(__cplusplus)/c\\\n\
#ifdef\t__cplusplus\\\n\
extern \"C\" {\\\n\
-#endif",
+#endif\\\n",
"-e", "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n\
#ifdef\t__cplusplus\\\n\
}\\\n\
-#endif",
+#endif\\\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-fixincludes_inclhack_def,v 1.2 2016/09/01 17:30:33 pascal Exp $
--- fixincludes/inclhack.def.orig Mon Feb 1 21:27:47 2016
+++ fixincludes/inclhack.def Sat Aug 6 19:19:03 2016
@@ -3307,9 +3307,9 @@ fix = {
mach = "*-*-solaris2.*";
files = complex.h;
sed = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
- "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
+ "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif\\\n";
sed = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
- "#ifdef\t__cplusplus\\\n}\\\n#endif";
+ "#ifdef\t__cplusplus\\\n}\\\n#endif\\\n";
test_text = "#if !defined(__cplusplus)\n"
"#endif /* !defined(__cplusplus) */";
};

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-gcc_Makefile_in,v 1.3 2018/04/28 16:38:25 jca Exp $
- clang hack needed at least on arm
- disable fixincludes madness
Index: gcc/Makefile.in
--- gcc/Makefile.in.orig
+++ gcc/Makefile.in
@@ -1944,6 +1944,12 @@ DRIVER_DEFINES = \
CFLAGS-gcc.o += $(DRIVER_DEFINES)
+ISCLANG = $(shell $(CC) --version | grep -c clang)
+
+ifeq ($(ISCLANG),1)
+CFLAGS-insn-attrtab.o += -fbracket-depth=512
+endif
+
specs.h : s-specs ; @true
s-specs : Makefile
lsf="$(lang_specs_files)"; for f in $$lsf; do \
@@ -2730,7 +2736,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
gcc_dir=`${PWD_COMMAND}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd $(build_objdir)/fixincludes && \
- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+ $(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
$(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
rm -f $${fix_dir}/syslimits.h; \
if [ -f $${fix_dir}/limits.h ]; then \

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_ada_a-calend_adb,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/a-calend.adb.orig Mon Jan 20 00:59:54 2014
+++ gcc/ada/a-calend.adb Mon Jan 20 01:00:33 2014
@@ -684,9 +684,7 @@ package body Ada.Calendar is
type int_Pointer is access all Interfaces.C.int;
type long_Pointer is access all Interfaces.C.long;
- type time_t is
- range -(2 ** (Standard'Address_Size - Integer'(1))) ..
- +(2 ** (Standard'Address_Size - Integer'(1)) - 1);
+ type time_t is new Long_Long_Integer;
type time_t_Pointer is access all time_t;
procedure localtime_tzoff

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-gcc_ada_adaint_c,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/adaint.c.orig Mon Feb 24 17:51:58 2014
+++ gcc/ada/adaint.c Wed Apr 23 12:48:59 2014
@@ -1546,8 +1546,9 @@ __gnat_file_time_fd (int fd)
/* Set the file time stamp. */
void
-__gnat_set_file_time_name (char *name, time_t time_stamp)
+__gnat_set_file_time_name (char *name, OS_Time ts)
{
+ time_t time_stamp = (time_t) ts;
#if defined (__vxworks)
/* Code to implement __gnat_set_file_time_name for these systems. */
@@ -2562,7 +2563,8 @@ __gnat_number_of_cpus (void)
{
int cores = 1;
-#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__)
+#if defined (linux) || defined (sun) || defined (AIX) || defined (__APPLE__) ||\
+ defined (__OpenBSD__)
cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
#elif defined (__hpux__)
@@ -4002,3 +4004,9 @@ __gnat_get_executable_load_address (void)
#ifdef __cplusplus
}
#endif
+
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_adaint_h,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/adaint.h.orig Mon Feb 24 17:51:58 2014
+++ gcc/ada/adaint.h Wed Apr 23 12:48:59 2014
@@ -156,7 +156,7 @@ extern OS_Time __gnat_file_time_name (c
extern OS_Time __gnat_file_time_fd (int);
/* return -1 in case of error */
-extern void __gnat_set_file_time_name (char *, time_t);
+extern void __gnat_set_file_time_name (char *, OS_Time);
extern int __gnat_dup (int);
extern int __gnat_dup2 (int, int);

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-gcc_ada_g-calend_ads,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/g-calend.ads.orig Mon Jan 20 03:37:23 2014
+++ gcc/ada/g-calend.ads Mon Jan 20 03:39:20 2014
@@ -162,7 +162,11 @@ private
-- This is a dummy declaration that should be the largest possible timeval
-- structure of all supported targets.
- type timeval is array (1 .. 2) of Interfaces.C.long;
+ type timeval is
+ record
+ tv_sec : Long_Long_Integer;
+ tv_usec : Interfaces.C.long;
+ end record;
function Julian_Day
(Year : Ada.Calendar.Year_Number;

View File

@ -1,32 +0,0 @@
$OpenBSD: patch-gcc_ada_gcc-interface_Make-lang_in,v 1.2 2015/02/17 12:04:44 tobiasu Exp $
--- gcc/ada/gcc-interface/Make-lang.in.orig Tue Mar 11 00:58:30 2014
+++ gcc/ada/gcc-interface/Make-lang.in Sat Feb 14 14:43:08 2015
@@ -774,7 +774,7 @@ ada.install-common:
-if [ -f gnat1$(exeext) ] ; \
then \
for tool in $(ADA_TOOLS) ; do \
- install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
+ install_name=$$tool$(exeext); \
$(RM) $(DESTDIR)$(bindir)/$$install_name; \
if [ -f $$tool-cross$(exeext) ] ; \
then \
@@ -811,7 +811,7 @@ ada.install-plugin:
ada.uninstall:
for tool in $(ADA_TOOLS) ; do \
- install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \
+ install_name=$$tool$(exeext); \
-$(RM) $(DESTDIR)$(bindir)/$$install_name; \
done
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatdll$(exeext)
@@ -878,8 +878,8 @@ ada.stagefeedback: stagefeedback-start
lang_checks += check-gnat
-check-ada: check-acats check-gnat
-check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
+check-ada: check-gnat
+check-ada-subtargets: check-gnat-subtargets
ACATSDIR = $(TESTSUITEDIR)/ada/acats

View File

@ -1,264 +0,0 @@
$OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.5 2016/09/01 17:30:33 pascal Exp $
--- gcc/ada/gcc-interface/Makefile.in.orig Sun Dec 6 15:11:54 2015
+++ gcc/ada/gcc-interface/Makefile.in Sat Aug 6 19:19:04 2016
@@ -431,6 +431,10 @@ ATOMICS_TARGET_PAIRS = \
a-szunau.adb<a-szunau-shared.adb \
a-szuzti.adb<a-szuzti-shared.adb
+# Disable shared strings because of overlapping memcpy issue
+# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64057
+ATOMICS_TARGET_PAIRS =
+
ATOMICS_BUILTINS_TARGET_PAIRS = \
s-atocou.adb<s-atocou-builtin.adb
@@ -1374,6 +1378,249 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cp
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
EH_MECHANISM=-gcc
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out arm openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-arm.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out %86 openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(X86_TARGET_PAIRS) \
+ system.ads<system-openbsd-x86.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out %86_64 openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(X86_64_TARGET_PAIRS) \
+ system.ads<system-openbsd-x86_64.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out sparc64 openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-sparcv9.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out sparc openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-sparc.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out powerpc openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-ppc.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out mips64 openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-mips64.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out mips64el openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-mips64el.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
+ THREADSLIB= -lpthread
+ GMEM_LIB = gmemlib
+ LIBRARY_VERSION := $(LIB_VERSION)
+ MISCLIB = -lutil
+endif
+
+ifeq ($(strip $(filter-out hppa openbsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<a-intnam-freebsd.ads \
+ s-inmaop.adb<s-inmaop-posix.adb \
+ s-intman.adb<s-intman-posix.adb \
+ s-osinte.ads<s-osinte-openbsd.ads \
+ s-osinte.adb<s-osinte-openbsd.adb \
+ s-osprim.adb<s-osprim-posix.adb \
+ s-taprop.adb<s-taprop-posix.adb \
+ s-taspri.ads<s-taspri-posix.ads \
+ s-tpopsp.adb<s-tpopsp-posix.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<system-openbsd-hppa.ads
+
+ TOOLS_TARGET_PAIRS = \
+ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
+ GNATLIB_SHARED = gnatlib-shared-dual
+
+ # Empty when not using ZCX
+ EH_MECHANISM=
THREADSLIB= -lpthread
GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION)

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-gcc_ada_osint_adb,v 1.1 2015/02/17 12:04:44 tobiasu Exp $
GNAT tools try to guess the name of the gcc binary by looking at their
own prefix and suffix. Subsequently they're trying to compile code using
the base gcc if argv[0] does't start with "e".
This hack to their name-guessing hack fixes the problem while touching the
least amount of files.
--- gcc/ada/osint.adb.orig Tue Feb 25 16:02:01 2014
+++ gcc/ada/osint.adb Sat Feb 14 18:33:49 2015
@@ -2272,6 +2272,13 @@ package body Osint is
Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1;
end if;
+ if Nam = "gcc" and then
+ Name_Buffer (Start_Of_Prefix .. End_Of_Prefix) = "" and then
+ Name_Buffer (Start_Of_Suffix .. Name_Len) = ""
+ then
+ return new String'("egcc");
+ end if;
+
-- Create the new program name
return new String'

View File

@ -1,119 +0,0 @@
$OpenBSD: patch-gcc_ada_s-osinte-openbsd_adb,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
--- gcc/ada/s-osinte-openbsd.adb.orig Mon Jun 17 16:05:29 2013
+++ gcc/ada/s-osinte-openbsd.adb Mon Jun 17 17:12:06 2013
@@ -0,0 +1,115 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . O S _ I N T E R F A C E --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 1991-2009, Free Software Foundation, Inc. --
+-- --
+-- GNARL is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. It is --
+-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
+-- State University (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the OpenBSD THREADS version of this package
+
+with Interfaces.C; use Interfaces.C;
+
+package body System.OS_Interface is
+
+ -----------
+ -- Errno --
+ -----------
+
+ function Errno return int is
+ type int_ptr is access all int;
+
+ function internal_errno return int_ptr;
+ pragma Import (C, internal_errno, "__errno");
+
+ begin
+ return (internal_errno.all);
+ end Errno;
+
+ --------------------
+ -- Get_Stack_Base --
+ --------------------
+
+ function Get_Stack_Base (thread : pthread_t) return Address is
+ pragma Unreferenced (thread);
+ begin
+ return (0);
+ end Get_Stack_Base;
+
+ ------------------
+ -- pthread_init --
+ ------------------
+
+ procedure pthread_init is
+ begin
+ null;
+ end pthread_init;
+
+ -----------------
+ -- To_Duration --
+ -----------------
+
+ function To_Duration (TS : timespec) return Duration is
+ begin
+ return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9;
+ end To_Duration;
+
+ ------------------------
+ -- To_Target_Priority --
+ ------------------------
+
+ function To_Target_Priority
+ (Prio : System.Any_Priority) return Interfaces.C.int
+ is
+ begin
+ return Interfaces.C.int (Prio);
+ end To_Target_Priority;
+
+ -----------------
+ -- To_Timespec --
+ -----------------
+
+ function To_Timespec (D : Duration) return timespec is
+ S : time_t;
+ F : Duration;
+
+ begin
+ S := time_t (Long_Long_Integer (D));
+ F := D - Duration (S);
+
+ -- If F has negative value due to a round-up, adjust for positive F
+
+ if F < 0.0 then
+ S := S - 1;
+ F := F + 1.0;
+ end if;
+
+ return timespec'(ts_sec => S,
+ ts_nsec => long (Long_Long_Integer (F * 10#1#E9)));
+ end To_Timespec;
+
+end System.OS_Interface;

View File

@ -1,644 +0,0 @@
$OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1.1.1 2014/06/26 16:30:16 pascal Exp $
--- gcc/ada/s-osinte-openbsd.ads.orig Mon Jan 20 00:29:13 2014
+++ gcc/ada/s-osinte-openbsd.ads Mon Jan 20 02:52:03 2014
@@ -0,0 +1,640 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . O S _ I N T E R F A C E --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNARL was developed by the GNARL team at Florida State University. It is --
+-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
+-- State University (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the OpenBSD PTHREADS version of this package
+
+-- This package encapsulates all direct interfaces to OS services
+-- that are needed by the tasking run-time (libgnarl).
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
+
+with Ada.Unchecked_Conversion;
+
+with Interfaces.C;
+
+package System.OS_Interface is
+ pragma Preelaborate;
+
+ pragma Linker_Options ("-lpthread");
+
+ subtype int is Interfaces.C.int;
+ subtype short is Interfaces.C.short;
+ subtype long is Interfaces.C.long;
+ subtype unsigned is Interfaces.C.unsigned;
+ subtype unsigned_short is Interfaces.C.unsigned_short;
+ subtype unsigned_long is Interfaces.C.unsigned_long;
+ subtype unsigned_char is Interfaces.C.unsigned_char;
+ subtype plain_char is Interfaces.C.plain_char;
+ subtype size_t is Interfaces.C.size_t;
+
+ -----------
+ -- Errno --
+ -----------
+
+ function Errno return int;
+ pragma Inline (Errno);
+
+ EAGAIN : constant := 35;
+ EINTR : constant := 4;
+ EINVAL : constant := 22;
+ ENOMEM : constant := 12;
+ ETIMEDOUT : constant := 60;
+
+ -------------
+ -- Signals --
+ -------------
+
+ Max_Interrupt : constant := 31;
+ type Signal is new int range 0 .. Max_Interrupt;
+ for Signal'Size use int'Size;
+
+ SIGHUP : constant := 1; -- hangup
+ SIGINT : constant := 2; -- interrupt (rubout)
+ SIGQUIT : constant := 3; -- quit (ASCD FS)
+ SIGILL : constant := 4; -- illegal instruction (not reset)
+ SIGTRAP : constant := 5; -- trace trap (not reset)
+ SIGIOT : constant := 6; -- IOT instruction
+ SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
+ SIGEMT : constant := 7; -- EMT instruction
+ SIGFPE : constant := 8; -- floating point exception
+ SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
+ SIGBUS : constant := 10; -- bus error
+ SIGSEGV : constant := 11; -- segmentation violation
+ SIGSYS : constant := 12; -- bad argument to system call
+ SIGPIPE : constant := 13; -- write on a pipe with no one to read it
+ SIGALRM : constant := 14; -- alarm clock
+ SIGTERM : constant := 15; -- software termination signal from kill
+ SIGURG : constant := 16; -- urgent condition on IO channel
+ SIGSTOP : constant := 17; -- stop (cannot be caught or ignored)
+ SIGTSTP : constant := 18; -- user stop requested from tty
+ SIGCONT : constant := 19; -- stopped process has been continued
+ SIGCLD : constant := 20; -- alias for SIGCHLD
+ SIGCHLD : constant := 20; -- child status change
+ SIGTTIN : constant := 21; -- background tty read attempted
+ SIGTTOU : constant := 22; -- background tty write attempted
+ SIGIO : constant := 23; -- I/O possible (Solaris SIGPOLL alias)
+ SIGXCPU : constant := 24; -- CPU time limit exceeded
+ SIGXFSZ : constant := 25; -- filesize limit exceeded
+ SIGVTALRM : constant := 26; -- virtual timer expired
+ SIGPROF : constant := 27; -- profiling timer expired
+ SIGWINCH : constant := 28; -- window size change
+ SIGINFO : constant := 29; -- information request (NetBSD/FreeBSD)
+ SIGUSR1 : constant := 30; -- user defined signal 1
+ SIGUSR2 : constant := 31; -- user defined signal 2
+
+ SIGADAABORT : constant := SIGABRT;
+ -- Change this if you want to use another signal for task abort.
+ -- SIGTERM might be a good one.
+
+ type Signal_Set is array (Natural range <>) of Signal;
+
+ -- Interrupts that must be unmasked at all times. FreeBSD
+ -- pthreads will not allow an application to mask out any
+ -- interrupt needed by the threads library.
+ Unmasked : constant Signal_Set :=
+ (SIGTRAP, SIGBUS, SIGTTIN, SIGTTOU, SIGTSTP);
+
+ -- FreeBSD will uses SIGPROF for timing. Do not allow a
+ -- handler to attach to this signal.
+ Reserved : constant Signal_Set := (0 .. 0 => SIGPROF);
+
+ type sigset_t is private;
+
+ function sigaddset
+ (set : access sigset_t;
+ sig : Signal) return int;
+ pragma Import (C, sigaddset, "sigaddset");
+
+ function sigdelset
+ (set : access sigset_t;
+ sig : Signal) return int;
+ pragma Import (C, sigdelset, "sigdelset");
+
+ function sigfillset (set : access sigset_t) return int;
+ pragma Import (C, sigfillset, "sigfillset");
+
+ function sigismember
+ (set : access sigset_t;
+ sig : Signal) return int;
+ pragma Import (C, sigismember, "sigismember");
+
+ function sigemptyset (set : access sigset_t) return int;
+ pragma Import (C, sigemptyset, "sigemptyset");
+
+ -- sigcontext is architecture dependent, so define it private
+ type struct_sigcontext is private;
+
+ type struct_sigaction is record
+ sa_handler : System.Address;
+ sa_mask : sigset_t;
+ sa_flags : int;
+ end record;
+ pragma Convention (C, struct_sigaction);
+
+ type struct_sigaction_ptr is access all struct_sigaction;
+
+ SIG_BLOCK : constant := 1;
+ SIG_UNBLOCK : constant := 2;
+ SIG_SETMASK : constant := 3;
+
+ SIG_DFL : constant := 0;
+ SIG_IGN : constant := 1;
+
+ SA_SIGINFO : constant := 16#0040#;
+ SA_ONSTACK : constant := 16#0001#;
+
+ function sigaction
+ (sig : Signal;
+ act : struct_sigaction_ptr;
+ oact : struct_sigaction_ptr) return int;
+ pragma Import (C, sigaction, "sigaction");
+
+ ----------
+ -- Time --
+ ----------
+
+ Time_Slice_Supported : constant Boolean := True;
+ -- Indicates whether time slicing is supported (i.e SCHED_RR is supported)
+
+ type timespec is private;
+
+ function nanosleep (rqtp, rmtp : access timespec) return int;
+ pragma Import (C, nanosleep, "nanosleep");
+
+ type clockid_t is new int;
+
+ function clock_gettime
+ (clock_id : clockid_t;
+ tp : access timespec)
+ return int;
+ pragma Import (C, clock_gettime, "clock_gettime");
+
+ function To_Duration (TS : timespec) return Duration;
+ pragma Inline (To_Duration);
+
+ function To_Timespec (D : Duration) return timespec;
+ pragma Inline (To_Timespec);
+
+ type struct_timezone is record
+ tz_minuteswest : int;
+ tz_dsttime : int;
+ end record;
+ pragma Convention (C, struct_timezone);
+
+ -------------------------
+ -- Priority Scheduling --
+ -------------------------
+
+ SCHED_FIFO : constant := 1;
+ SCHED_OTHER : constant := 2;
+ SCHED_RR : constant := 3;
+
+ function To_Target_Priority
+ (Prio : System.Any_Priority) return Interfaces.C.int;
+ -- Maps System.Any_Priority to a POSIX priority
+
+ -------------
+ -- Process --
+ -------------
+
+ type pid_t is private;
+
+ Self_PID : constant pid_t;
+
+ function kill (pid : pid_t; sig : Signal) return int;
+ pragma Import (C, kill, "kill");
+
+ function getpid return pid_t;
+ pragma Import (C, getpid, "getpid");
+
+ ---------
+ -- LWP --
+ ---------
+
+ function lwp_self return System.Address;
+ -- lwp_self does not exist on this thread library, revert to pthread_self
+ -- which is the closest approximation (with getpid). This function is
+ -- needed to share 7staprop.adb across POSIX-like targets.
+ pragma Import (C, lwp_self, "pthread_self");
+
+ -------------
+ -- Threads --
+ -------------
+
+ type Thread_Body is access
+ function (arg : System.Address) return System.Address;
+ pragma Convention (C, Thread_Body);
+
+ function Thread_Body_Access is new
+ Ada.Unchecked_Conversion (System.Address, Thread_Body);
+
+ type pthread_t is private;
+ subtype Thread_Id is pthread_t;
+
+ type pthread_mutex_t is limited private;
+ type pthread_cond_t is limited private;
+ type pthread_attr_t is limited private;
+ type pthread_mutexattr_t is limited private;
+ type pthread_condattr_t is limited private;
+ type pthread_key_t is private;
+
+ PTHREAD_CREATE_DETACHED : constant := 1;
+ PTHREAD_CREATE_JOINABLE : constant := 0;
+
+ PTHREAD_SCOPE_PROCESS : constant := 0;
+ PTHREAD_SCOPE_SYSTEM : constant := 2;
+
+ -- Read/Write lock not supported on freebsd. To add support both types
+ -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined
+ -- with the associated routines pthread_rwlock_[init/destroy] and
+ -- pthread_rwlock_[rdlock/wrlock/unlock].
+
+ subtype pthread_rwlock_t is pthread_mutex_t;
+ subtype pthread_rwlockattr_t is pthread_mutexattr_t;
+
+ -----------
+ -- Stack --
+ -----------
+
+ type stack_t is record
+ ss_sp : System.Address;
+ ss_size : size_t;
+ ss_flags : int;
+ end record;
+ pragma Convention (C, stack_t);
+
+ function sigaltstack
+ (ss : not null access stack_t;
+ oss : access stack_t) return int;
+ pragma Import (C, sigaltstack, "sigaltstack");
+
+ Alternate_Stack : aliased System.Address;
+ -- This is a dummy definition, never used (Alternate_Stack_Size is null)
+
+ Alternate_Stack_Size : constant := 0;
+ -- No alternate signal stack is used on this platform
+
+ Stack_Base_Available : constant Boolean := False;
+ -- Indicates whether the stack base is available on this target. This
+ -- allows us to share s-osinte.adb between all the FSU run time. Note that
+ -- this value can only be true if pthread_t has a complete definition that
+ -- corresponds exactly to the C header files.
+
+ function Get_Stack_Base (thread : pthread_t) return Address;
+ pragma Inline (Get_Stack_Base);
+ -- returns the stack base of the specified thread. Only call this function
+ -- when Stack_Base_Available is True.
+
+ function Get_Page_Size return size_t;
+ function Get_Page_Size return Address;
+ pragma Import (C, Get_Page_Size, "getpagesize");
+ -- Returns the size of a page
+
+ PROT_NONE : constant := 0;
+ PROT_READ : constant := 1;
+ PROT_WRITE : constant := 2;
+ PROT_EXEC : constant := 4;
+ PROT_ALL : constant := PROT_READ + PROT_WRITE + PROT_EXEC;
+ PROT_ON : constant := PROT_NONE;
+ PROT_OFF : constant := PROT_ALL;
+
+ function mprotect (addr : Address; len : size_t; prot : int) return int;
+ pragma Import (C, mprotect);
+
+ ---------------------------------------
+ -- Nonstandard Thread Initialization --
+ ---------------------------------------
+
+ -- FSU_THREADS requires pthread_init, which is nonstandard and this should
+ -- be invoked during the elaboration of s-taprop.adb.
+
+ -- FreeBSD does not require this so we provide an empty Ada body
+
+ procedure pthread_init;
+
+ -------------------------
+ -- POSIX.1c Section 3 --
+ -------------------------
+
+ function sigwait
+ (set : access sigset_t;
+ sig : access Signal) return int;
+ pragma Import (C, sigwait, "sigwait");
+
+ function pthread_kill
+ (thread : pthread_t;
+ sig : Signal) return int;
+ pragma Import (C, pthread_kill, "pthread_kill");
+
+ function pthread_sigmask
+ (how : int;
+ set : access sigset_t;
+ oset : access sigset_t) return int;
+ pragma Import (C, pthread_sigmask, "pthread_sigmask");
+
+ --------------------------
+ -- POSIX.1c Section 11 --
+ --------------------------
+
+ function pthread_mutexattr_init
+ (attr : access pthread_mutexattr_t) return int;
+ pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init");
+
+ function pthread_mutexattr_destroy
+ (attr : access pthread_mutexattr_t) return int;
+ pragma Import (C, pthread_mutexattr_destroy, "pthread_mutexattr_destroy");
+
+ function pthread_mutex_init
+ (mutex : access pthread_mutex_t;
+ attr : access pthread_mutexattr_t) return int;
+ pragma Import (C, pthread_mutex_init, "pthread_mutex_init");
+
+ function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
+ pragma Import (C, pthread_mutex_destroy, "pthread_mutex_destroy");
+
+ function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
+ pragma Import (C, pthread_mutex_lock, "pthread_mutex_lock");
+
+ function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
+ pragma Import (C, pthread_mutex_unlock, "pthread_mutex_unlock");
+
+ function pthread_condattr_init
+ (attr : access pthread_condattr_t) return int;
+ pragma Import (C, pthread_condattr_init, "pthread_condattr_init");
+
+ function pthread_condattr_destroy
+ (attr : access pthread_condattr_t) return int;
+ pragma Import (C, pthread_condattr_destroy, "pthread_condattr_destroy");
+
+ function pthread_cond_init
+ (cond : access pthread_cond_t;
+ attr : access pthread_condattr_t) return int;
+ pragma Import (C, pthread_cond_init, "pthread_cond_init");
+
+ function pthread_cond_destroy (cond : access pthread_cond_t) return int;
+ pragma Import (C, pthread_cond_destroy, "pthread_cond_destroy");
+
+ function pthread_cond_signal (cond : access pthread_cond_t) return int;
+ pragma Import (C, pthread_cond_signal, "pthread_cond_signal");
+
+ function pthread_cond_wait
+ (cond : access pthread_cond_t;
+ mutex : access pthread_mutex_t) return int;
+ pragma Import (C, pthread_cond_wait, "pthread_cond_wait");
+
+ function pthread_cond_timedwait
+ (cond : access pthread_cond_t;
+ mutex : access pthread_mutex_t;
+ abstime : access timespec) return int;
+ pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait");
+
+ Relative_Timed_Wait : constant Boolean := False;
+ -- pthread_cond_timedwait requires an absolute delay time
+
+ --------------------------
+ -- POSIX.1c Section 13 --
+ --------------------------
+
+ PTHREAD_PRIO_NONE : constant := 0;
+ PTHREAD_PRIO_PROTECT : constant := 2;
+ PTHREAD_PRIO_INHERIT : constant := 1;
+
+ function pthread_mutexattr_setprotocol
+ (attr : access pthread_mutexattr_t;
+ protocol : int) return int;
+ pragma Import
+ (C, pthread_mutexattr_setprotocol, "pthread_mutexattr_setprotocol");
+
+ function pthread_mutexattr_getprotocol
+ (attr : access pthread_mutexattr_t;
+ protocol : access int) return int;
+ pragma Import
+ (C, pthread_mutexattr_getprotocol, "pthread_mutexattr_getprotocol");
+
+ function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+ prioceiling : int) return int;
+ pragma Import
+ (C, pthread_mutexattr_setprioceiling,
+ "pthread_mutexattr_setprioceiling");
+
+ function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+ prioceiling : access int) return int;
+ pragma Import
+ (C, pthread_mutexattr_getprioceiling,
+ "pthread_mutexattr_getprioceiling");
+
+ type struct_sched_param is record
+ sched_priority : int;
+ end record;
+ pragma Convention (C, struct_sched_param);
+
+ function pthread_getschedparam
+ (thread : pthread_t;
+ policy : access int;
+ param : access struct_sched_param) return int;
+ pragma Import (C, pthread_getschedparam, "pthread_getschedparam");
+
+ function pthread_setschedparam
+ (thread : pthread_t;
+ policy : int;
+ param : access struct_sched_param) return int;
+ pragma Import (C, pthread_setschedparam, "pthread_setschedparam");
+
+ function pthread_attr_setscope
+ (attr : access pthread_attr_t;
+ contentionscope : int) return int;
+ pragma Import (C, pthread_attr_setscope, "pthread_attr_setscope");
+
+ function pthread_attr_getscope
+ (attr : access pthread_attr_t;
+ contentionscope : access int) return int;
+ pragma Import (C, pthread_attr_getscope, "pthread_attr_getscope");
+
+ function pthread_attr_setinheritsched
+ (attr : access pthread_attr_t;
+ inheritsched : int) return int;
+ pragma Import
+ (C, pthread_attr_setinheritsched, "pthread_attr_setinheritsched");
+
+ function pthread_attr_getinheritsched
+ (attr : access pthread_attr_t;
+ inheritsched : access int) return int;
+ pragma Import
+ (C, pthread_attr_getinheritsched, "pthread_attr_getinheritsched");
+
+ function pthread_attr_setschedpolicy
+ (attr : access pthread_attr_t;
+ policy : int) return int;
+ pragma Import (C, pthread_attr_setschedpolicy,
+ "pthread_attr_setschedpolicy");
+
+ function pthread_attr_getschedpolicy
+ (attr : access pthread_attr_t;
+ policy : access int) return int;
+ pragma Import (C, pthread_attr_getschedpolicy,
+ "pthread_attr_getschedpolicy");
+
+ function pthread_attr_setschedparam
+ (attr : access pthread_attr_t;
+ sched_param : int) return int;
+ pragma Import (C, pthread_attr_setschedparam, "pthread_attr_setschedparam");
+
+ function pthread_attr_getschedparam
+ (attr : access pthread_attr_t;
+ sched_param : access int) return int;
+ pragma Import (C, pthread_attr_getschedparam, "pthread_attr_getschedparam");
+
+ function sched_yield return int;
+ pragma Import (C, sched_yield, "pthread_yield");
+
+ --------------------------
+ -- P1003.1c Section 16 --
+ --------------------------
+
+ function pthread_attr_init (attributes : access pthread_attr_t) return int;
+ pragma Import (C, pthread_attr_init, "pthread_attr_init");
+
+ function pthread_attr_destroy
+ (attributes : access pthread_attr_t) return int;
+ pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy");
+
+ function pthread_attr_setdetachstate
+ (attr : access pthread_attr_t;
+ detachstate : int) return int;
+ pragma Import
+ (C, pthread_attr_setdetachstate, "pthread_attr_setdetachstate");
+
+ function pthread_attr_getdetachstate
+ (attr : access pthread_attr_t;
+ detachstate : access int) return int;
+ pragma Import
+ (C, pthread_attr_getdetachstate, "pthread_attr_getdetachstate");
+
+ function pthread_attr_getstacksize
+ (attr : access pthread_attr_t;
+ stacksize : access size_t) return int;
+ pragma Import
+ (C, pthread_attr_getstacksize, "pthread_attr_getstacksize");
+
+ function pthread_attr_setstacksize
+ (attr : access pthread_attr_t;
+ stacksize : size_t) return int;
+ pragma Import
+ (C, pthread_attr_setstacksize, "pthread_attr_setstacksize");
+
+ function pthread_create
+ (thread : access pthread_t;
+ attributes : access pthread_attr_t;
+ start_routine : Thread_Body;
+ arg : System.Address) return int;
+ pragma Import (C, pthread_create, "pthread_create");
+
+ function pthread_detach (thread : pthread_t) return int;
+ pragma Import (C, pthread_detach, "pthread_detach");
+
+ procedure pthread_exit (status : System.Address);
+ pragma Import (C, pthread_exit, "pthread_exit");
+
+ function pthread_self return pthread_t;
+ pragma Import (C, pthread_self, "pthread_self");
+
+ --------------------------
+ -- POSIX.1c Section 17 --
+ --------------------------
+
+ function pthread_setspecific
+ (key : pthread_key_t;
+ value : System.Address) return int;
+ pragma Import (C, pthread_setspecific, "pthread_setspecific");
+
+ function pthread_getspecific (key : pthread_key_t) return System.Address;
+ pragma Import (C, pthread_getspecific, "pthread_getspecific");
+
+ type destructor_pointer is access procedure (arg : System.Address);
+ pragma Convention (C, destructor_pointer);
+
+ function pthread_key_create
+ (key : access pthread_key_t;
+ destructor : destructor_pointer) return int;
+ pragma Import (C, pthread_key_create, "pthread_key_create");
+
+ ------------------------------------
+ -- Non-portable Pthread Functions --
+ ------------------------------------
+
+ function pthread_set_name_np
+ (thread : pthread_t;
+ name : System.Address) return int;
+ pragma Import (C, pthread_set_name_np, "pthread_set_name_np");
+
+private
+
+ type sigset_t is array (1 .. 4) of unsigned;
+
+ -- In FreeBSD the component sa_handler turns out to
+ -- be one a union type, and the selector is a macro:
+ -- #define sa_handler __sigaction_u._handler
+ -- #define sa_sigaction __sigaction_u._sigaction
+
+ -- Should we add a signal_context type here ???
+ -- How could it be done independent of the CPU architecture ???
+ -- sigcontext type is opaque, so it is architecturally neutral.
+ -- It is always passed as an access type, so define it as an empty record
+ -- since the contents are not used anywhere.
+
+ type struct_sigcontext is null record;
+ pragma Convention (C, struct_sigcontext);
+
+ type pid_t is new int;
+ Self_PID : constant pid_t := 0;
+
+ type time_t is new Long_Long_Integer;
+
+ type timespec is record
+ ts_sec : time_t;
+ ts_nsec : long;
+ end record;
+ pragma Convention (C, timespec);
+
+ type pthread_t is new System.Address;
+ type pthread_attr_t is new System.Address;
+ type pthread_mutex_t is new System.Address;
+ type pthread_mutexattr_t is new System.Address;
+ type pthread_cond_t is new System.Address;
+ type pthread_condattr_t is new System.Address;
+ type pthread_key_t is new int;
+
+end System.OS_Interface;

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-gcc_ada_s-osprim-posix_adb,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/s-osprim-posix.adb.orig Mon Jan 20 02:55:58 2014
+++ gcc/ada/s-osprim-posix.adb Mon Jan 20 02:56:39 2014
@@ -38,7 +38,7 @@ package body System.OS_Primitives is
-- these declarations in System.OS_Interface and move these ones in
-- the spec.
- type time_t is new Long_Integer;
+ type time_t is new Long_Long_Integer;
type timespec is record
tv_sec : time_t;
@@ -54,7 +54,11 @@ package body System.OS_Primitives is
-----------
function Clock return Duration is
- type timeval is array (1 .. 2) of Long_Integer;
+ type timeval is
+ record
+ tv_sec : time_t;
+ tv_usec : Long_Integer;
+ end record;
procedure timeval_to_duration
(T : not null access timeval;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_ada_sysdep_c,v 1.1.1.1 2014/06/26 16:30:18 pascal Exp $
--- gcc/ada/sysdep.c.orig Mon Jan 20 16:23:37 2014
+++ gcc/ada/sysdep.c Fri Feb 14 21:33:08 2014
@@ -854,7 +854,7 @@ __gnat_localtime_tzoff (const time_t *timer, const int
struct tm */
#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
- defined (__GLIBC__)
+ defined (__GLIBC__) || defined (__OpenBSD__)
{
localtime_r (timer, &tp);
*off = tp.tm_gmtoff;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-arm_ads,v 1.1 2015/12/05 22:00:29 tobiasu Exp $
--- gcc/ada/system-openbsd-arm.ads.orig Mon Nov 23 01:57:01 2015
+++ gcc/ada/system-openbsd-arm.ads Mon Nov 23 01:59:10 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/ARM Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 32;
+ Memory_Size : constant := 2 ** 32;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := Low_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-hppa_ads,v 1.2 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-hppa.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-hppa.ads Wed Sep 16 18:58:35 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/hppa Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 32;
+ Memory_Size : constant := 2 ** 32;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-mips64_ads,v 1.1 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-mips64.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-mips64.ads Wed Sep 16 18:58:44 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/mips64 Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-mips64el_ads,v 1.1 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-mips64el.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-mips64el.ads Wed Sep 16 18:58:49 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/mips64el Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := Low_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-ppc_ads,v 1.1 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-ppc.ads.orig Thu Sep 17 02:52:33 2015
+++ gcc/ada/system-openbsd-ppc.ads Thu Sep 17 02:54:53 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/powerpc Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 32;
+ Memory_Size : constant := 2 ** 32;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-sparc_ads,v 1.1 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-sparc.ads.orig Wed Sep 16 17:58:16 2015
+++ gcc/ada/system-openbsd-sparc.ads Wed Sep 16 18:58:55 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/sparc Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 32;
+ Memory_Size : constant := 2 ** 32;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-sparcv9_ads,v 1.2 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-sparcv9.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-sparcv9.ads Wed Sep 16 18:59:37 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/sparc64 Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := High_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-x86_64_ads,v 1.2 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-x86_64.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-x86_64.ads Wed Sep 16 19:00:03 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/amd64 Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 64;
+ Memory_Size : constant := 2 ** 64;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := Low_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,148 +0,0 @@
$OpenBSD: patch-gcc_ada_system-openbsd-x86_ads,v 1.2 2015/09/24 22:29:59 tobiasu Exp $
--- gcc/ada/system-openbsd-x86.ads.orig Wed Sep 16 16:53:13 2015
+++ gcc/ada/system-openbsd-x86.ads Wed Sep 16 18:59:47 2015
@@ -0,0 +1,144 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT RUN-TIME COMPONENTS --
+-- --
+-- S Y S T E M --
+-- --
+-- S p e c --
+-- (OpenBSD/i386 Version) --
+-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- --
+-- This specification is derived from the Ada Reference Manual for use with --
+-- GNAT. The copyright notice above, and the license provisions that follow --
+-- apply solely to the contents of the part following the private keyword. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+-- --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception, --
+-- version 3.1, as published by the Free Software Foundation. --
+-- --
+-- You should have received a copy of the GNU General Public License and --
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
+-- <http://www.gnu.org/licenses/>. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+package System is
+ pragma Pure;
+ -- Note that we take advantage of the implementation permission to make
+ -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
+ -- 2005, this is Pure in any case (AI-362).
+
+ type Name is (SYSTEM_NAME_GNAT);
+ System_Name : constant Name := SYSTEM_NAME_GNAT;
+
+ -- System-Dependent Named Numbers
+
+ Min_Int : constant := Long_Long_Integer'First;
+ Max_Int : constant := Long_Long_Integer'Last;
+
+ Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
+ Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
+
+ Max_Base_Digits : constant := Long_Long_Float'Digits;
+ Max_Digits : constant := Long_Long_Float'Digits;
+
+ Max_Mantissa : constant := 63;
+ Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
+
+ Tick : constant := 0.000_001;
+
+ -- Storage-related Declarations
+
+ type Address is private;
+ pragma Preelaborable_Initialization (Address);
+ Null_Address : constant Address;
+
+ Storage_Unit : constant := 8;
+ Word_Size : constant := 32;
+ Memory_Size : constant := 2 ** 32;
+
+ -- Address comparison
+
+ function "<" (Left, Right : Address) return Boolean;
+ function "<=" (Left, Right : Address) return Boolean;
+ function ">" (Left, Right : Address) return Boolean;
+ function ">=" (Left, Right : Address) return Boolean;
+ function "=" (Left, Right : Address) return Boolean;
+
+ pragma Import (Intrinsic, "<");
+ pragma Import (Intrinsic, "<=");
+ pragma Import (Intrinsic, ">");
+ pragma Import (Intrinsic, ">=");
+ pragma Import (Intrinsic, "=");
+
+ -- Other System-Dependent Declarations
+
+ type Bit_Order is (High_Order_First, Low_Order_First);
+ Default_Bit_Order : constant Bit_Order := Low_Order_First;
+ pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
+
+ -- Priority-related Declarations (RM D.1)
+
+ Max_Priority : constant Positive := 30;
+ Max_Interrupt_Priority : constant Positive := 31;
+
+ subtype Any_Priority is Integer range 0 .. 31;
+ subtype Priority is Any_Priority range 0 .. 30;
+ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
+
+ Default_Priority : constant Priority := 15;
+
+private
+
+ type Address is mod Memory_Size;
+ Null_Address : constant Address := 0;
+
+ --------------------------------------
+ -- System Implementation Parameters --
+ --------------------------------------
+
+ -- These parameters provide information about the target that is used
+ -- by the compiler. They are in the private part of System, where they
+ -- can be accessed using the special circuitry in the Targparm unit
+ -- whose source should be consulted for more detailed descriptions
+ -- of the individual switch values.
+
+ Backend_Divide_Checks : constant Boolean := False;
+ Backend_Overflow_Checks : constant Boolean := True;
+ Command_Line_Args : constant Boolean := True;
+ Configurable_Run_Time : constant Boolean := False;
+ Denorm : constant Boolean := True;
+ Duration_32_Bits : constant Boolean := False;
+ Exit_Status_Supported : constant Boolean := True;
+ Fractional_Fixed_Ops : constant Boolean := False;
+ Frontend_Layout : constant Boolean := False;
+ Machine_Overflows : constant Boolean := False;
+ Machine_Rounds : constant Boolean := True;
+ Preallocated_Stacks : constant Boolean := False;
+ Signed_Zeros : constant Boolean := True;
+ Stack_Check_Default : constant Boolean := False;
+ Stack_Check_Probes : constant Boolean := True;
+ Stack_Check_Limits : constant Boolean := False;
+ Support_Aggregates : constant Boolean := True;
+ Support_Atomic_Primitives : constant Boolean := True;
+ Support_Composite_Assign : constant Boolean := True;
+ Support_Composite_Compare : constant Boolean := True;
+ Support_Long_Shifts : constant Boolean := True;
+ Always_Compatible_Rep : constant Boolean := False;
+ Suppress_Standard_Library : constant Boolean := False;
+ Use_Ada_Main_Program_Name : constant Boolean := False;
+ ZCX_By_Default : constant Boolean := False;
+
+end System;

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-gcc_bitmap_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/bitmap.c
--- gcc/bitmap.c.orig
+++ gcc/bitmap.c
@@ -2166,9 +2166,9 @@ print_statistics (bitmap_descriptor_d **slot, output_i
s[41] = 0;
fprintf (stderr,
"%-41s %9u"
- " %15"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d"
- " %15"HOST_WIDEST_INT_PRINT"d"
- " %10"HOST_WIDEST_INT_PRINT"d %10"HOST_WIDEST_INT_PRINT"d\n",
+ " %15" HOST_WIDEST_INT_PRINT "d %15" HOST_WIDEST_INT_PRINT "d"
+ " %15" HOST_WIDEST_INT_PRINT "d"
+ " %10" HOST_WIDEST_INT_PRINT "d %10" HOST_WIDEST_INT_PRINT "d\n",
s, d->created,
d->allocated, d->peak, d->current,
d->nsearches, d->search_iter);
@@ -2201,7 +2201,7 @@ dump_bitmap_statistics (void)
bitmap_desc_hash.traverse <output_info *, print_statistics> (&info);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
fprintf (stderr,
- "%-41s %9"HOST_WIDEST_INT_PRINT"d %15"HOST_WIDEST_INT_PRINT"d\n",
+ "%-41s %9" HOST_WIDEST_INT_PRINT "d %15" HOST_WIDEST_INT_PRINT "d\n",
"Total", info.count, info.size);
fprintf (stderr, "---------------------------------------------------------------------------------\n");
}

View File

@ -1,55 +0,0 @@
$OpenBSD: patch-gcc_builtins_c,v 1.2 2015/07/19 21:22:49 pascal Exp $
--- gcc/builtins.c.orig Fri Feb 27 11:32:14 2015
+++ gcc/builtins.c Sat Jun 27 11:26:32 2015
@@ -125,9 +125,11 @@ static rtx expand_builtin_memcpy (tree, rtx);
static rtx expand_builtin_mempcpy (tree, rtx, enum machine_mode);
static rtx expand_builtin_mempcpy_args (tree, tree, tree, rtx,
enum machine_mode, int);
+#ifndef NO_UNSAFE_BUILTINS
static rtx expand_builtin_strcpy (tree, rtx);
static rtx expand_builtin_strcpy_args (tree, tree, rtx);
static rtx expand_builtin_stpcpy (tree, rtx, enum machine_mode);
+#endif
static rtx expand_builtin_strncpy (tree, rtx);
static rtx builtin_memset_gen_str (void *, HOST_WIDE_INT, enum machine_mode);
static rtx expand_builtin_memset (tree, rtx, enum machine_mode);
@@ -3375,6 +3377,7 @@ expand_builtin_mempcpy_args (tree dest, tree src, tree
# define CODE_FOR_movstr CODE_FOR_nothing
#endif
+#ifndef NO_UNSAFE_BUILTINS
/* Expand into a movstr instruction, if one is available. Return NULL_RTX if
we failed, the caller should emit a normal call, otherwise try to
get the result in TARGET, if convenient. If ENDP is 0 return the
@@ -3526,6 +3529,7 @@ expand_builtin_stpcpy (tree exp, rtx target, enum mach
return expand_movstr (dst, src, target, /*endp=*/2);
}
}
+#endif
/* Callback routine for store_by_pieces. Read GET_MODE_BITSIZE (MODE)
bytes from constant string DATA + OFFSET and return it as target
@@ -6145,9 +6149,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, e
break;
case BUILT_IN_STRCPY:
+#ifndef NO_UNSAFE_BUILTINS
target = expand_builtin_strcpy (exp, target);
if (target)
return target;
+#endif
break;
case BUILT_IN_STRNCPY:
@@ -6157,9 +6163,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, e
break;
case BUILT_IN_STPCPY:
+#ifndef NO_UNSAFE_BUILTINS
target = expand_builtin_stpcpy (exp, target, mode);
if (target)
return target;
+#endif
break;
case BUILT_IN_MEMCPY:

View File

@ -1,93 +0,0 @@
$OpenBSD: patch-gcc_c-family_c-format_c,v 1.2 2018/11/25 18:44:20 daniel Exp $
Index: gcc/c-family/c-format.c
--- gcc/c-family/c-format.c.orig
+++ gcc/c-family/c-format.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
format_type_error. Target-specific format types do not have
matching enum values. */
enum format_type { printf_format_type, asm_fprintf_format_type,
+ kprintf_format_type, syslog_format_type,
gcc_diag_format_type, gcc_tdiag_format_type,
gcc_cdiag_format_type,
gcc_cxxdiag_format_type, gcc_gfc_format_type,
@@ -418,6 +419,16 @@ static const format_length_info gcc_diag_length_specs[
{ NO_FMT, NO_FMT, 0 }
};
+static const format_length_info kprintf_length_specs[] =
+{
+ { "h", FMT_LEN_h, STD_C89, NO_FMT, 0 },
+ { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L, 0 },
+ { "q", FMT_LEN_ll, STD_EXT, NO_FMT, 0 },
+ { "z", FMT_LEN_z, STD_C99, NO_FMT, 0 },
+ { "t", FMT_LEN_t, STD_C99, NO_FMT, 0 },
+ { NO_FMT, NO_FMT, 0 }
+};
+
/* The custom diagnostics all accept the same length specifiers. */
#define gcc_tdiag_length_specs gcc_diag_length_specs
#define gcc_cdiag_length_specs gcc_diag_length_specs
@@ -642,6 +653,44 @@ static const format_char_info asm_fprintf_char_table[]
{ NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
+static const format_char_info kprint_char_table[] =
+{
+ /* C89 conversion specifiers. */
+ { "di", 0, STD_C89, { T89_I, BADLEN, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +'I", "i", NULL },
+ { "oxX", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, T99_UPD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL },
+ { "u", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, T99_UPD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0'I", "i", NULL },
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, T89_UL, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "c", NULL },
+/* Kernel bitmap formatting */
+ { "b", 0, STD_C89, { T89_I, BADLEN, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", kprint_char_table + 8 },
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL },
+/* Kernel bitmap formatting, second part - similar to "s" except for types[] */
+ { "b", 1, STD_C89, { T89_C, BADLEN, T89_C, T89_C, T89_C, BADLEN, T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, NULL, "cR", NULL }
+};
+
+static const format_char_info syslog_char_table[] =
+{
+ /* C89 conversion specifiers. */
+ { "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM }, "-wp0 +'I", "i", NULL },
+ { "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0#", "i", NULL },
+ { "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM }, "-wp0'I", "i", NULL },
+ { "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
+ { "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
+ { "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
+ { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
+ { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
+ { "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM }, "", "W", NULL },
+ /* C99 conversion specifiers. */
+ { "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#'", "", NULL },
+ { "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
+ /* X/Open conversion specifiers. */
+ { "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
+ { "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
+ { "m", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
+ { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
+};
+
static const format_char_info gcc_diag_char_table[] =
{
/* C89 conversion specifiers. */
@@ -821,6 +870,18 @@ static const format_kind_info format_types_orig[] =
FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK,
'w', 0, 'p', 0, 'L', 0,
NULL, NULL
+ },
+ { "kprintf", kprintf_length_specs, kprint_char_table, " +#0-'I", NULL,
+ printf_flag_specs, printf_flag_pairs,
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK,
+ 'w', 0, 'p', 0, 'L', 0,
+ &integer_type_node, &integer_type_node
+ },
+ { "syslog", printf_length_specs, syslog_char_table, " +#0-'I", NULL,
+ printf_flag_specs, printf_flag_pairs,
+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK,
+ 'w', 0, 'p', 0, 'L', 0,
+ &integer_type_node, &integer_type_node
},
{ "gcc_diag", gcc_diag_length_specs, gcc_diag_char_table, "q+#", NULL,
gcc_diag_flag_specs, gcc_diag_flag_pairs,

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-gcc_c-family_c_opt,v 1.1.1.1 2014/06/26 16:30:16 pascal Exp $
--- gcc/c-family/c.opt.orig Sat Jan 25 00:13:49 2014
+++ gcc/c-family/c.opt Fri Feb 14 20:24:53 2014
@@ -633,13 +633,9 @@ C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning Lang
Warn about function pointer arithmetic
Wpointer-sign
-C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall)
+C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wpedantic)
Warn when a pointer differs in signedness in an assignment
-Wpointer-sign
-C ObjC LangEnabledBy(C ObjC,Wpedantic)
-;
-
Wpointer-to-int-cast
C ObjC Var(warn_pointer_to_int_cast) Init(1) Warning
Warn when a pointer is cast to an integer of a different size
@@ -1195,6 +1191,10 @@ C++ ObjC++ Ignore Warn(switch %qs is no longer support
fthreadsafe-statics
C++ ObjC++ Optimization Var(flag_threadsafe_statics) Init(1)
-fno-threadsafe-statics Do not generate thread-safe code for initializing local statics
+
+ftrampolines
+Common Var(flag_trampolines)
+Allows trampolines
funsigned-bitfields
C ObjC C++ ObjC++ Var(flag_signed_bitfields, 0)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_c_c-decl_c,v 1.2 2015/07/19 21:22:49 pascal Exp $
--- gcc/c/c-decl.c.orig Wed Jun 3 17:29:35 2015
+++ gcc/c/c-decl.c Sat Jun 27 11:26:32 2015
@@ -4922,6 +4922,8 @@ warn_variable_length_array (tree name, tree size)
"variable length array is used");
}
}
+ if (warn_variable_decl)
+ warning (OPT_Wvariable_decl, "variable-sized array %qE", name);
}
/* Given declspecs and a declarator,

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-gcc_cgraph_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/cgraph.c
--- gcc/cgraph.c.orig
+++ gcc/cgraph.c
@@ -1378,7 +1378,7 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgrap
if (dump_file)
fprintf (dump_file,
"Expanding speculative call of %s/%i -> %s/%i count:"
- HOST_WIDEST_INT_PRINT_DEC"\n",
+ HOST_WIDEST_INT_PRINT_DEC "\n",
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (e->callee->name ()),
@@ -1976,7 +1976,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " First run: %i\n", node->tp_first_run);
fprintf (f, " Function flags:");
if (node->count)
- fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
+ fprintf (f, " executed " HOST_WIDEST_INT_PRINT_DEC "x",
(HOST_WIDEST_INT)node->count);
if (node->origin)
fprintf (f, " nested in: %s", node->origin->asm_name ());
@@ -2028,7 +2028,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, "%s/%i ", edge->caller->asm_name (),
edge->caller->order);
if (edge->count)
- fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
+ fprintf (f, "(" HOST_WIDEST_INT_PRINT_DEC "x) ",
(HOST_WIDEST_INT)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",
@@ -2055,7 +2055,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
if (edge->indirect_inlining_edge)
fprintf (f, "(indirect_inlining) ");
if (edge->count)
- fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
+ fprintf (f, "(" HOST_WIDEST_INT_PRINT_DEC "x) ",
(HOST_WIDEST_INT)edge->count);
if (edge->frequency)
fprintf (f, "(%.2f per call) ",

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_common_config_arm_arm-common_c,v 1.1 2016/09/15 10:22:10 pascal Exp $
--- gcc/common/config/arm/arm-common.c.orig Wed Sep 14 14:42:07 2016
+++ gcc/common/config/arm/arm-common.c Wed Sep 14 14:42:32 2016
@@ -30,8 +30,6 @@
/* Set default optimization options. */
static const struct default_options arm_option_optimization_table[] =
{
- /* Enable section anchors by default at -O1 or higher. */
- { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }

View File

@ -1,98 +0,0 @@
$OpenBSD: patch-gcc_common_opt,v 1.2 2015/07/19 21:22:49 pascal Exp $
--- gcc/common.opt.orig Thu Feb 26 03:43:52 2015
+++ gcc/common.opt Sat Jun 27 11:26:32 2015
@@ -580,6 +580,10 @@ Wlarger-than=
Common RejectNegative Joined UInteger Warning
-Wlarger-than=<number> Warn if an object is larger than <number> bytes
+Wstack-larger-than-
+Common RejectNegative Joined UInteger
+-Wstack-larger-than-<number> Warn if a function is using more than <number> bytes of stack space for its local variables.
+
Wunsafe-loop-optimizations
Common Var(warn_unsafe_loop_optimizations) Warning
Warn if the loop cannot be optimized due to nontrivial assumptions.
@@ -644,7 +648,7 @@ Common Var(warn_suggest_attribute_noreturn) Warning
Warn about functions which might be candidates for __attribute__((noreturn))
Wsystem-headers
-Common Var(warn_system_headers) Warning
+Common Var(warn_system_headers) Init(1) Warning
Do not suppress warnings from system headers
Wtrampolines
@@ -699,6 +703,10 @@ Wunused-variable
Common Var(warn_unused_variable) Warning EnabledBy(Wunused)
Warn when a variable is unused
+Wvariable-decl
+Common Var(warn_variable_decl)
+Warn about variable-sized declarations
+
Wcoverage-mismatch
Common Var(warn_coverage_mismatch) Init(1) Warning
Warn in case profiles in -fprofile-use do not match
@@ -811,7 +819,7 @@ fabi-version=
Common Joined RejectNegative UInteger Var(flag_abi_version) Init(2)
faggressive-loop-optimizations
-Common Report Var(flag_aggressive_loop_optimizations) Optimization Init(1)
+Common Report Var(flag_aggressive_loop_optimizations) Optimization
Aggressively optimize loops using language constraints
falign-functions
@@ -1008,7 +1016,7 @@ Common Report Var(flag_delete_dead_exceptions) Init(0)
Delete dead instructions that may throw exceptions
fdelete-null-pointer-checks
-Common Report Var(flag_delete_null_pointer_checks) Init(1) Optimization
+Common Report Var(flag_delete_null_pointer_checks)
Delete useless null pointer checks
fdevirtualize-speculatively
@@ -1292,7 +1300,7 @@ Enable guessing of branch probabilities
; On SVR4 targets, it also controls whether or not to emit a
; string identifying the compiler.
fident
-Common Report Var(flag_no_ident,0)
+Common Report Var(flag_no_ident,0) Init(1)
Process #ident directives
fif-conversion
@@ -1648,7 +1656,7 @@ Common Report Var(flag_pic,2) Negative(fPIE)
Generate position-independent code if possible (large mode)
fPIE
-Common Report Var(flag_pie,2) Negative(fpic)
+Common Report Var(flag_pie,2) Negative(fpic) Init(PIE_DEFAULT)
Generate position-independent code for executables if possible (large mode)
fpic
@@ -1964,7 +1972,7 @@ Common RejectNegative Joined Var(common_deferred_optio
-fstack-limit-symbol=<name> Trap if the stack goes past symbol <name>
fstack-protector
-Common Report Var(flag_stack_protect, 1)
+Common Report Var(flag_stack_protect, 3) Init(-1)
Use propolice as a stack protection method
fstack-protector-all
@@ -2442,7 +2450,7 @@ Common JoinedOrMissing Negative(gdwarf-)
Generate debug information in default version of DWARF format
gdwarf-
-Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
+Common Joined UInteger Var(dwarf_version) Init(2) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format
ggdb
@@ -2530,6 +2538,9 @@ no-canonical-prefixes
Driver
nodefaultlibs
+Driver
+
+nopie
Driver
nostartfiles

View File

@ -1,75 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_alpha_c,v 1.3 2015/07/19 21:22:49 pascal Exp $
--- gcc/config/alpha/alpha.c.orig Sun May 17 09:24:27 2015
+++ gcc/config/alpha/alpha.c Sat Jun 27 11:26:32 2015
@@ -470,11 +470,17 @@ alpha_option_override (void)
if (!global_options_set.x_g_switch_value)
g_switch_value = 8;
+#ifdef OPENBSD_NATIVE
+ /* Make -fpic behave as -fPIC unless -msmall-data is specified. */
+ if (flag_pic == 2 && TARGET_SMALL_DATA)
+ warning (0, "-fPIC used with -msmall-data");
+#else
/* Infer TARGET_SMALL_DATA from -fpic/-fPIC. */
if (flag_pic == 1)
target_flags |= MASK_SMALL_DATA;
else if (flag_pic == 2)
target_flags &= ~MASK_SMALL_DATA;
+#endif
/* Align labels and loops for optimal branching. */
/* ??? Kludge these by not doing anything if we don't optimize. */
@@ -7646,6 +7652,9 @@ alpha_expand_prologue (void)
sa_size = alpha_sa_size ();
frame_size = compute_frame_size (get_frame_size (), sa_size);
+ if (warn_stack_larger_than && frame_size > stack_larger_than_size)
+ warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", frame_size);
+
if (flag_stack_usage_info)
current_function_static_stack_size = frame_size;
@@ -7684,6 +7693,8 @@ alpha_expand_prologue (void)
if (flag_stack_check)
probed_size += STACK_CHECK_PROTECT;
+if (flag_stack_check || STACK_CHECK_BUILTIN)
+ {
if (probed_size <= 32768)
{
if (probed_size > 4096)
@@ -7762,6 +7773,34 @@ alpha_expand_prologue (void)
gen_rtx_SET (VOIDmode, stack_pointer_rtx,
plus_constant (Pmode, stack_pointer_rtx,
-frame_size)));
+ }
+ }
+ else
+ {
+ if (frame_size <= 32768)
+ {
+ if (frame_size != 0)
+ FRP (emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
+ GEN_INT (-frame_size))));
+ }
+ else
+ {
+ rtx count = gen_rtx_REG (DImode, 23);
+ rtx seq;
+
+ emit_move_insn (count, GEN_INT (-frame_size));
+ seq = emit_insn (gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx,
+ count));
+
+ /* This alternative is special, because the DWARF code cannot
+ possibly intuit through the loop above. So we invent this
+ note it looks at instead. */
+ RTX_FRAME_RELATED_P (seq) = 1;
+ add_reg_note (seq, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
+ plus_constant (Pmode, stack_pointer_rtx,
+ -frame_size)));
+ }
}
/* Cope with very large offsets to the register save area. */

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_alpha_md,v 1.2 2016/09/01 17:30:33 pascal Exp $
--- gcc/config/alpha/alpha.md.orig Wed May 18 21:53:16 2016
+++ gcc/config/alpha/alpha.md Sat Aug 6 19:19:04 2016
@@ -4888,7 +4888,8 @@
if (CONST_INT_P (operands[1])
&& INTVAL (operands[1]) < 32768)
{
- if (INTVAL (operands[1]) >= 4096)
+ if (INTVAL (operands[1]) >= 4096
+ && (flag_stack_check || STACK_CHECK_BUILTIN))
{
/* We do this the same way as in the prologue and generate explicit
probes. Then we update the stack by the constant. */

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_alpha_opt,v 1.1.1.1 2014/06/26 16:30:16 pascal Exp $
--- gcc/config/alpha/alpha.opt.orig Wed Mar 14 18:58:35 2012
+++ gcc/config/alpha/alpha.opt Fri Oct 12 10:42:47 2012
@@ -38,8 +38,13 @@ mieee
Target Report RejectNegative Mask(IEEE)
Emit IEEE-conformant code, without inexact exceptions
+mno-ieee
+Target Report RejectNegative InverseMask(IEEE)
+Emit non-IEEE-conformant code
+
mieee-with-inexact
Target Report RejectNegative Mask(IEEE_WITH_INEXACT)
+Emit IEEE-conformant code, with inexact exceptions
mbuild-constants
Target Report Mask(BUILD_CONSTANTS)

View File

@ -1,61 +0,0 @@
$OpenBSD: patch-gcc_config_alpha_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/alpha/openbsd.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/alpha/openbsd.h Sat Jul 9 22:13:30 2016
@@ -19,6 +19,28 @@ along with GCC; see the file COPYING3. If not see
/* Controlling the compilation driver. */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (MASK_FPREGS | MASK_IEEE | MASK_IEEE_CONFORMANT)
+
+ #define LINK_SPEC \
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
/* run-time target specifications */
#define TARGET_OS_CPP_BUILTINS() \
do { \
@@ -28,18 +50,27 @@ along with GCC; see the file COPYING3. If not see
/* Layout of source language data types. */
-/* This must agree with <machine/ansi.h> */
+/* This must agree with <machine/_types.h> */
#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "long int"
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+
+#undef WINT_TYPE
+#define WINT_TYPE "int"
#define LOCAL_LABEL_PREFIX "."

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_config_arm_arm_opt,v 1.1 2016/09/18 15:05:15 pascal Exp $
--- gcc/config/arm/arm.opt.orig Sat Sep 17 21:13:02 2016
+++ gcc/config/arm/arm.opt Sat Sep 17 21:13:25 2016
@@ -265,7 +265,7 @@ Avoid overlapping destination and address registers on
that may trigger Cortex-M3 errata.
munaligned-access
-Target Report Var(unaligned_access) Init(2)
+Target Report Var(unaligned_access) Init(0)
Enable unaligned word and halfword accesses to packed data.
mneon-for-64bits

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-gcc_config_arm_openbsd1_h,v 1.1 2016/09/15 10:22:10 pascal Exp $
--- gcc/config/arm/openbsd1.h.orig Wed Sep 14 14:36:09 2016
+++ gcc/config/arm/openbsd1.h Wed Sep 14 14:36:22 2016
@@ -0,0 +1,26 @@
+/* Definitions of target machine for GNU compiler, OpenBSD/arm ELF version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Wasabi Systems, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+
+/* use EABI frame unwinding tables. */
+#define ARM_UNWIND_INFO 1

View File

@ -1,249 +0,0 @@
$OpenBSD: patch-gcc_config_arm_openbsd_h,v 1.5 2018/08/11 14:11:01 bcallah Exp $
Index: gcc/config/arm/openbsd.h
--- gcc/config/arm/openbsd.h.orig
+++ gcc/config/arm/openbsd.h
@@ -0,0 +1,244 @@
+/* Definitions of target machine for GNU compiler, OpenBSD/arm ELF version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Wasabi Systems, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Run-time Target Specification. */
+//#undef TARGET_VERSION
+//#define TARGET_VERSION fputs (" (OpenBSD/arm)", stderr);
+
+/* This is used in ASM_FILE_START. */
+//#undef ARM_OS_NAME
+//#define ARM_OS_NAME "OpenBSD"
+
+/* Unsigned chars produces much better code than signed. */
+#define DEFAULT_SIGNED_CHAR 0
+
+
+/* This defaults us to little-endian. */
+#ifndef TARGET_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT 0
+#endif
+
+#undef MULTILIB_DEFAULTS
+
+/* armv5te default cpu. */
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_mpcore
+
+/* We default to a soft-float ABI so that binaries can run on all
+ target hardware. */
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+
+/* We default to the "aapcs-linux" ABI so that enums are int-sized by
+ default. */
+#undef ARM_DEFAULT_ABI
+#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
+ } \
+ while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC OBSD_CPP_SPEC
+
+/* OBSD_LINK_SPEC appropriate for OpenBSD. Support for GCC options
+ -static, -assert, and -nostdlib. */
+#undef OBSD_LINK_SPEC
+#ifdef OBSD_NO_DYNAMIC_LIBRARIES
+#define OBSD_LINK_SPEC \
+ "%{!nostdlib:%{!r*:%{!e*:-e __start}}} %{assert*}"
+#else
+#define OBSD_LINK_SPEC \
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
+ -L/usr/lib"
+#endif
+
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC \
+ "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fPIC|fpie|fPIE:-k}"
+
+/* Default floating point model is soft-VFP.
+ FIXME: -mhard-float currently implies FPA. */
+#undef SUBTARGET_ASM_FLOAT_SPEC
+#define SUBTARGET_ASM_FLOAT_SPEC \
+ "%{mhard-float:-mfpu=fpa} \
+ %{msoft-float:-mfpu=softvfp} \
+ %{!mhard-float: \
+ %{!msoft-float:-mfpu=softvfp}}"
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \
+ { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC }, \
+ { "openbsd_link_spec", OBSD_LINK_SPEC }, \
+ { "openbsd_entry_point", OPENBSD_ENTRY_POINT },
+
+#define OPENBSD_ENTRY_POINT "__start"
+
+/* Pass -X to the linker so that it will strip symbols starting with 'L' */
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "-X %{mbig-endian:-EB} %{mlittle-endian:-EL} \
+ %(openbsd_link_spec)"
+
+/* Make GCC agree with <machine/_types.h>. */
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* We don't have any limit on the length as out debugger is GDB. */
+#undef DBX_CONTIN_LENGTH
+
+/* OpenBSD and NetBSD do their profiling differently to the Acorn compiler. We
+ don't need a word following the mcount call; and to skip it
+ requires either an assembly stub or use of fomit-frame-pointer when
+ compiling the profiling functions. Since we break Acorn CC
+ compatibility below a little more won't hurt. */
+
+#undef ARM_FUNCTION_PROFILER
+#define ARM_FUNCTION_PROFILER(STREAM,LABELNO) \
+{ \
+ asm_fprintf (STREAM, "\tmov\t%Rip, %Rlr\n"); \
+ asm_fprintf (STREAM, "\tbl\t__mcount%s\n", \
+ NEED_PLT_RELOC ? "(PLT)" : ""); \
+}
+
+/* On the ARM `@' introduces a comment, so we must use something else
+ for .type directives. */
+#undef TYPE_OPERAND_FMT
+#define TYPE_OPERAND_FMT "%%%s"
+
+#undef FPUTYPE_DEFAULT
+#define FPUTYPE_DEFAULT "vfp"
+
+/* VERY BIG NOTE: Change of structure alignment for OpenBSD|NetBSD/arm.
+ There are consequences you should be aware of...
+
+ Normally GCC/arm uses a structure alignment of 32 for compatibility
+ with armcc. This means that structures are padded to a word
+ boundary. However this causes problems with bugged OpenBSD|NetBSD kernel
+ code (possibly userland code as well - I have not checked every
+ binary). The nature of this bugged code is to rely on sizeof()
+ returning the correct size of various structures rounded to the
+ nearest byte (SCSI and ether code are two examples, the vm system
+ is another). This code breaks when the structure alignment is 32
+ as sizeof() will report a word=rounded size. By changing the
+ structure alignment to 8. GCC will conform to what is expected by
+ OpenBSD|NetBSD.
+
+ This has several side effects that should be considered.
+ 1. Structures will only be aligned to the size of the largest member.
+ i.e. structures containing only bytes will be byte aligned.
+ structures containing shorts will be half word alinged.
+ structures containing ints will be word aligned.
+
+ This means structures should be padded to a word boundary if
+ alignment of 32 is required for byte structures etc.
+
+ 2. A potential performance penalty may exist if strings are no longer
+ word aligned. GCC will not be able to use word load/stores to copy
+ short strings.
+
+ This modification is not encouraged but with the present state of the
+ OpenBSD|NetBSD source tree it is currently the only solution that meets the
+ requirements. */
+
+#undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
+#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
+
+/* Clear the instruction cache from `BEG' to `END'. This makes a
+ call to the ARM_SYNC_ICACHE architecture specific syscall. */
+#define CLEAR_INSN_CACHE(BEG, END) \
+do \
+ { \
+ extern int sysarch(int number, void *args); \
+ struct { \
+ unsigned int addr; \
+ int len; \
+ } s; \
+ s.addr = (unsigned int)(BEG); \
+ s.len = (END) - (BEG); \
+ (void) sysarch (0, &s); \
+ } \
+while (0)
+
+/* Provide a STARTFILE_SPEC appropriate for OpenBSD ELF. Here we
+ provide support for the special GCC option -static. On ELF
+ targets, we also add the crtbegin.o file, which provides part
+ of the support for getting C++ file-scope static objects
+ constructed before entering "main". */
+
+#define OPENBSD_STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt0%O%s} \
+ %{!pg: \
+ %{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}}} \
+ %:if-exists(crti%O%s) \
+ %{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
+ %{!static: \
+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}}"
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC OPENBSD_STARTFILE_SPEC
+
+/* Provide an ENDFILE_SPEC appropriate for OpenBSD ELF. Here we
+add crtend.o, which provides part of the support for getting
+C++ file-scope static objects deconstructed after exiting "main". */
+
+#define OPENBSD_ENDFILE_SPEC \
+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s} \
+ %:if-exists(crtn%O%s)"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC OPENBSD_ENDFILE_SPEC
+
+/* Remove -mcpu=native handling which is Linux specific */
+#undef DRIVER_SELF_SPECS
+#define DRIVER_SELF_SPECS ""
+
+/* dito */
+#undef EXTRA_SPEC_FUNCTIONS

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-gcc_config_elfos_h,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/config/elfos.h
--- gcc/config/elfos.h.orig
+++ gcc/config/elfos.h
@@ -99,7 +99,7 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
#undef ASM_OUTPUT_SKIP
#define ASM_OUTPUT_SKIP(FILE, SIZE) \
- fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
+ fprintf ((FILE), "%s" HOST_WIDE_INT_PRINT_UNSIGNED "\n",\
SKIP_ASM_OP, (SIZE))
/* This is how to store into the string LABEL
@@ -167,7 +167,7 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
{ \
fprintf ((FILE), "%s", COMMON_ASM_OP); \
assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
+ fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", \
(SIZE), (ALIGN) / BITS_PER_UNIT); \
} \
while (0)

View File

@ -1,44 +0,0 @@
$OpenBSD: patch-gcc_config_exec-stack_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/exec-stack.h.orig Wed Oct 18 13:49:09 2006
+++ gcc/config/exec-stack.h Wed Oct 18 13:49:04 2006
@@ -0,0 +1,40 @@
+/* Enable stack execute around trampoline address.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef FINALIZE_TRAMPOLINE
+#define FINALIZE_TRAMPOLINE(TRAMP) \
+ emit_library_call(gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), \
+ 0, VOIDmode, 1, memory_address (SImode, (TRAMP)), Pmode)
+
+#undef TRANSFER_FROM_TRAMPOLINE
+#define TRANSFER_FROM_TRAMPOLINE \
+extern void __enable_execute_stack (void *); \
+void \
+__enable_execute_stack (addr) \
+ void *addr; \
+{ \
+ long size = getpagesize (); \
+ long mask = ~(size-1); \
+ char *page = (char *) (((long) addr) & mask); \
+ char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
+ \
+ if (mprotect (page, end - page, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) \
+ perror ("mprotect of trampoline code"); \
+}

View File

@ -1,137 +0,0 @@
$OpenBSD: patch-gcc_config_gcc,v 1.10 2018/08/11 14:11:01 bcallah Exp $
Index: gcc/config.gcc
--- gcc/config.gcc.orig
+++ gcc/config.gcc
@@ -771,6 +771,14 @@ case ${target} in
default_use_cxa_atexit=yes
;;
esac
+ case ${target} in
+ *-*-openbsd[0-3].*|*-*-openbsd4.[012])
+ # keep default of no cxa_atexit support for these older releases
+ ;;
+ *)
+ default_use_cxa_atexit=yes
+ ;;
+ esac
;;
*-*-openbsd*)
tmake_file="t-openbsd"
@@ -951,7 +959,7 @@ alpha*-*-netbsd*)
alpha/elf.opt"
;;
alpha*-*-openbsd*)
- tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
+ tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT PIE_DEFAULT=2"
tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
extra_options="${extra_options} openbsd.opt alpha/elf.opt"
# default x-alpha is only appropriate for dec-osf.
@@ -1018,6 +1026,13 @@ arm*-*-netbsdelf*)
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
tmake_file="${tmake_file} arm/t-arm"
;;
+arm-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=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"
+ extra_options="${extra_options} openbsd.opt"
+ tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
+ set
+ ;;
arm*-*-linux-*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
extra_options="${extra_options} linux-android.opt"
@@ -1206,6 +1221,7 @@ hppa*-*-linux*)
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_PA_11"
+ tm_defines="${tm_defines} PIE_DEFAULT=1"
tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
extra_options="${extra_options} openbsd.opt"
@@ -1380,6 +1396,7 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
use_collect2=yes
;;
i[34567]86-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=1"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
extra_options="${extra_options} openbsd.opt"
@@ -1387,6 +1404,7 @@ i[34567]86-*-openbsd*)
gnu_ld=yes
;;
x86_64-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=1"
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
extra_options="${extra_options} openbsd.opt"
@@ -1946,6 +1964,18 @@ microblaze*-*-elf)
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
tmake_file="${tmake_file} microblaze/t-microblaze"
;;
+mips64-*-openbsd*)
+ set
+ tm_file="dbxelf.h elfos.h openbsd.h mips/mips.h mips/openbsd.h openbsd-libpthread.h"
+ tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_64 PIE_DEFAULT=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_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_64 TARGET_ENDIAN_DEFAULT=0 PIE_DEFAULT=1"
+ extra_options="${extra_options} openbsd.opt"
+ ;;
mips*-*-netbsd*) # NetBSD/mips, either endian.
target_cpu_default="MASK_ABICALLS"
tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
@@ -2173,11 +2203,12 @@ picochip-*)
use_gcc_stdint=wrap
tmake_file="picochip/t-picochip t-pnt16-warn"
;;
-# port not yet contributed
-#powerpc-*-openbsd*)
-# tmake_file="${tmake_file} rs6000/t-fprules"
-# extra_headers=
-# ;;
+powerpc-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=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"
+ tmake_file="${tmake_file} rs6000/t-openbsd"
+ extra_options="${extra_options} rs6000/sysv4.opt openbsd.opt"
+ ;;
powerpc-*-darwin*)
extra_options="${extra_options} rs6000/darwin.opt"
case ${target} in
@@ -2747,11 +2778,19 @@ sparc64-*-netbsd*)
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
;;
+sparc-*-openbsd*)
+ tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-libpthread.h sparc/sysv4.h sparc/openbsd.h"
+ extra_options="${extra_options} openbsd.opt"
+ gas=yes
+ gnu_ld=yes
+ with_cpu=v7
+ tmake_file="${tmake_file} sparc/t-sparc"
+ ;;
sparc64-*-openbsd*)
+ tm_defines="${tm_defines} PIE_DEFAULT=2"
tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
extra_options="${extra_options} openbsd.opt"
- extra_options="${extra_options}"
gas=yes gnu_ld=yes
with_cpu=ultrasparc
tmake_file="${tmake_file} sparc/t-sparc"
@@ -2938,6 +2977,12 @@ case ${target} in
else
arch=i386
fi
+ cpu=generic
+ arch_without_sse2=yes
+ arch_without_64bit=yes
+ ;;
+ i386-*-openbsd*)
+ arch=i486
cpu=generic
arch_without_sse2=yes
arch_without_64bit=yes

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-gcc_config_i386_i386_c,v 1.5 2017/06/07 23:34:02 brynet Exp $
--- gcc/config/i386/i386.c.orig Mon Aug 1 12:03:41 2016
+++ gcc/config/i386/i386.c Sun Jun 4 04:30:01 2017
@@ -2307,6 +2307,8 @@ struct ix86_frame
HOST_WIDE_INT reg_save_offset;
HOST_WIDE_INT sse_reg_save_offset;
+ HOST_WIDE_INT local_size;
+
/* When save_regs_using_mov is set, emit prologue using
move instead of push instructions. */
bool save_regs_using_mov;
@@ -9527,6 +9529,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
HOST_WIDE_INT size = get_frame_size ();
HOST_WIDE_INT to_allocate;
+ frame->local_size = size;
frame->nregs = ix86_nsaved_regs ();
frame->nsseregs = ix86_nsaved_sseregs ();
@@ -10904,6 +10907,9 @@ ix86_expand_prologue (void)
m->fs.realigned = true;
}
+ if (warn_stack_larger_than && frame.local_size > stack_larger_than_size)
+ warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", frame.local_size);
+
int_registers_saved = (frame.nregs == 0);
sse_registers_saved = (frame.nsseregs == 0);
@@ -26860,7 +26866,7 @@ ix86_local_alignment (tree exp, enum machine_mode mode
!= TYPE_MAIN_VARIANT (va_list_type_node)))
&& TYPE_SIZE (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
- && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 16
+ && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
|| TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
return 128;
}

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-gcc_config_i386_openbsd_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/i386/openbsd.h.orig Thu Jan 10 21:38:27 2013
+++ gcc/config/i386/openbsd.h Wed Jan 23 22:48:29 2013
@@ -38,16 +38,19 @@ along with GCC; see the file COPYING3. If not see
/* This must agree with <machine/ansi.h> */
#undef SIZE_TYPE
-#define SIZE_TYPE "unsigned int"
+#define SIZE_TYPE "long unsigned int"
#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "int"
+#define PTRDIFF_TYPE "long int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+
+#undef WINT_TYPE
+#define WINT_TYPE "int"
/* Assembler format: overall framework. */

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-gcc_config_i386_openbsdelf_h,v 1.3 2018/08/11 14:11:01 bcallah Exp $
Index: gcc/config/i386/openbsdelf.h
--- gcc/config/i386/openbsdelf.h.orig
+++ gcc/config/i386/openbsdelf.h
@@ -97,14 +97,18 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
%{assert*} \
- -dynamic-linker /usr/libexec/ld.so"
+ -dynamic-linker /usr/libexec/ld.so \
+ -L/usr/lib"
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#define SUBTARGET32_DEFAULT_CPU "i486"
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_mips_mips_h,v 1.2 2015/07/19 21:22:49 pascal Exp $
--- gcc/config/mips/mips.h.orig Thu Feb 26 11:40:06 2015
+++ gcc/config/mips/mips.h Sat Jun 27 11:26:33 2015
@@ -1241,7 +1241,9 @@ FP_ASM_SPEC "\
#define SUBTARGET_CPP_SPEC ""
#endif
+#ifndef CPP_SPEC
#define CPP_SPEC "%(subtarget_cpp_spec)"
+#endif
/* This macro defines names of additional specifications to put in the specs
that can be used in various specifications like CC1_SPEC. Its definition

View File

@ -1,231 +0,0 @@
$OpenBSD: patch-gcc_config_mips_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/mips/openbsd.h.orig Sat Jul 9 22:05:54 2016
+++ gcc/config/mips/openbsd.h Sat Jul 9 22:28:39 2016
@@ -0,0 +1,227 @@
+/* Configuration file for a mips64 OpenBSD target.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+/* This must agree with <machine/_types.h> */
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#if 0
+/* dropped in 2007 in 311f69621cc28f7a626407f55cf2d60392856ccf
+ * See also 2f14b1f9d493c8f64d5ff6b284bfe91ad8433d37 */
+
+/* If defined, a C expression whose value is a string containing the
+ assembler operation to identify the following data as
+ uninitialized global data. If not defined, and neither
+ `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
+ uninitialized global data will be output in the data section if
+ `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
+ used. */
+#define BSS_SECTION_ASM_OP "\t.section\t.bss"
+
+#define ASM_OUTPUT_ALIGNED_BSS mips_output_aligned_bss
+#endif
+
+#undef ASM_DECLARE_OBJECT_NAME
+#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
+
+#undef MD_EXEC_PREFIX
+#undef MD_STARTFILE_PREFIX
+
+/* If we don't set MASK_ABICALLS, we can't default to PIC. */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT MASK_ABICALLS
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do { \
+ OPENBSD_OS_CPP_BUILTINS(); \
+ \
+ if (TARGET_64BIT) \
+ builtin_define ("__mips64__"); \
+ \
+ if (TARGET_ABICALLS) \
+ builtin_define ("__ABICALLS__"); \
+ \
+ if (mips_abi == ABI_EABI) \
+ builtin_define ("__mips_eabi"); \
+ else if (mips_abi == ABI_N32) \
+ builtin_define ("__mips_n32"); \
+ else if (mips_abi == ABI_64) \
+ builtin_define ("__mips_n64"); \
+ else if (mips_abi == ABI_O64) \
+ builtin_define ("__mips_o64"); \
+ \
+ if (mips_abi == ABI_N32) \
+ { \
+ builtin_define ("_ABIN32=2"); \
+ builtin_define ("_MIPS_SIM=_ABIN32"); \
+ builtin_define ("_MIPS_SZLONG=32"); \
+ builtin_define ("_MIPS_SZPTR=32"); \
+ } \
+ else if (mips_abi == ABI_64) \
+ { \
+ builtin_define ("_ABI64=3"); \
+ builtin_define ("_MIPS_SIM=_ABI64"); \
+ builtin_define ("_MIPS_SZLONG=64"); \
+ builtin_define ("_MIPS_SZPTR=64"); \
+ } \
+ else \
+ { \
+ builtin_define ("_ABIO32=1"); \
+ builtin_define ("_MIPS_SIM=_ABIO32"); \
+ builtin_define ("_MIPS_SZLONG=32"); \
+ builtin_define ("_MIPS_SZPTR=32"); \
+ } \
+ if (TARGET_FLOAT64) \
+ builtin_define ("_MIPS_FPSET=32"); \
+ else \
+ builtin_define ("_MIPS_FPSET=16"); \
+ \
+ builtin_define ("_MIPS_SZINT=32"); \
+ } while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC OBSD_CPP_SPEC
+
+/* A standard GNU/Linux mapping. On most targets, it is included in
+ CC1_SPEC itself by config/linux.h, but mips.h overrides CC1_SPEC
+ and provides this hook instead. */
+#undef SUBTARGET_CC1_SPEC
+#define SUBTARGET_CC1_SPEC "%{profile:-p}"
+
+/* From iris5.h */
+/* -G is incompatible with -KPIC which is the default, so only allow objects
+ in the small data section if the user explicitly asks for it. */
+#undef MIPS_DEFAULT_GVALUE
+#define MIPS_DEFAULT_GVALUE 0
+
+/* Borrowed from sparc/linux.h */
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%(endian_spec) \
+ %{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+#undef SUBTARGET_ASM_SPEC
+#define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}"
+
+/* The MIPS assembler has different syntax for .set. We set it to
+ .dummy to trap any errors. */
+#undef SET_ASM_OP
+#define SET_ASM_OP "\t.dummy\t"
+
+#undef ASM_OUTPUT_DEF
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
+ do { \
+ fputc ( '\t', FILE); \
+ assemble_name (FILE, LABEL1); \
+ fputs ( " = ", FILE); \
+ assemble_name (FILE, LABEL2); \
+ fputc ( '\n', FILE); \
+ } while (0)
+
+
+#if 0
+gone with a8cceccd90827cb0920c0af1ed823e37d8d72e2a
+
+#undef ASM_DECLARE_FUNCTION_NAME
+#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
+ do { \
+ if (!flag_inhibit_size_directive) \
+ { \
+ fputs ("\t.ent\t", STREAM); \
+ assemble_name (STREAM, NAME); \
+ putc ('\n', STREAM); \
+ } \
+ ASM_OUTPUT_TYPE_DIRECTIVE (STREAM, NAME, "function"); \
+ assemble_name (STREAM, NAME); \
+ fputs (":\n", STREAM); \
+ } while (0)
+
+#undef ASM_DECLARE_FUNCTION_SIZE
+#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
+ do { \
+ if (!flag_inhibit_size_directive) \
+ { \
+ fputs ("\t.end\t", STREAM); \
+ assemble_name (STREAM, NAME); \
+ putc ('\n', STREAM); \
+ } \
+ } while (0)
+
+/* Tell function_prologue in mips.c that we have already output the .ent/.end
+ pseudo-ops. */
+#undef FUNCTION_NAME_ALREADY_DECLARED
+#define FUNCTION_NAME_ALREADY_DECLARED 1
+#endif
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
+/* The glibc _mcount stub will save $v0 for us. Don't mess with saving
+ it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
+ presence of $gp-relative calls. */
+#undef ASM_OUTPUT_REG_PUSH
+#undef ASM_OUTPUT_REG_POP
+
+#undef LIB_SPEC
+#define LIB_SPEC OBSD_LIB_SPEC
+
+/* #undef ENABLE_EXECUTE_STACK */
+
+/* Default to -mfix-r4000 -mfix-r4400 when compiling big endian. */
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS \
+ do { \
+ if (TARGET_BIG_ENDIAN) \
+ { \
+ target_flags |= MASK_FIX_R4000 | MASK_FIX_R4400; \
+ } \
+ } while (0)

View File

@ -1,10 +0,0 @@
$OpenBSD: patch-gcc_config_openbsd-libpthread_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/openbsd-libpthread.h.orig Sun Sep 27 09:20:23 2009
+++ gcc/config/openbsd-libpthread.h Sat Aug 25 09:50:23 2012
@@ -18,5 +18,5 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread} -lc}"
+#define OBSD_LIB_SPEC "%{pthread:-lpthread%{!shared:%{p|pg:_p}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"

View File

@ -1,44 +0,0 @@
$OpenBSD: patch-gcc_config_openbsd_h,v 1.2 2018/12/07 18:27:35 naddy Exp $
Index: gcc/config/openbsd.h
--- gcc/config/openbsd.h.orig
+++ gcc/config/openbsd.h
@@ -40,6 +40,10 @@ along with GCC; see the file COPYING3. If not see
intended as common ground for arch that don't provide
anything suitable. */
+/* Make sure that gcc will not look for .h files in /usr/local/include
+ unless user explicitly requests it. */
+#undef LOCAL_INCLUDE_DIR
+
/* OPENBSD_NATIVE is defined only when gcc is configured as part of
the OpenBSD source tree, specifically through Makefile.bsd-wrapper.
@@ -108,9 +112,9 @@ while (0)
This two-stage defines makes it easy to pick that for targets that
have subspecs. */
#ifdef CPP_CPU_SPEC
-#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#else
-#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
#undef LIB_SPEC
@@ -284,6 +288,16 @@ do { \
#endif
/* Storage layout. */
+
+/*
+ * Disable the use of unsafe builtin functions, (strcat, strcpy, stpcpy),
+ * making them easier to spot in the object files.
+ */
+#define NO_UNSAFE_BUILTINS
+
+/* The system headers on OpenBSD are C++-aware. */
+#undef NO_IMPLICIT_EXTERN_C
+#define NO_IMPLICIT_EXTERN_C
#define HAVE_ENABLE_EXECUTE_STACK

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-gcc_config_openbsd_opt,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/openbsd.opt.orig Sat Jun 8 22:49:21 2013
+++ gcc/config/openbsd.opt Sat Jun 8 22:49:33 2013
@@ -32,4 +32,7 @@ Driver
pthread
Driver
+rdynamic
+Driver
+
; This comment is to ensure we retain the blank line above.

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-gcc_config_pa_pa-openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/pa/pa-openbsd.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/pa/pa-openbsd.h Sat Jul 9 22:26:21 2016
@@ -138,14 +138,15 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
%{assert*} \
-dynamic-linker /usr/libexec/ld.so"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
-
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-gcc_config_pa_pa_c,v 1.5 2016/09/01 17:30:33 pascal Exp $
--- gcc/config/pa/pa.c.orig Tue Jan 12 02:41:59 2016
+++ gcc/config/pa/pa.c Sat Aug 6 19:19:05 2016
@@ -3875,6 +3875,9 @@ pa_expand_prologue (void)
if (flag_stack_usage_info)
current_function_static_stack_size = actual_fsize;
+ if (warn_stack_larger_than && actual_fsize > stack_larger_than_size)
+ warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", actual_fsize);
+
/* Compute a few things we will use often. */
tmpreg = gen_rtx_REG (word_mode, 1);
@@ -10195,8 +10198,8 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx chai
}
#ifdef HAVE_ENABLE_EXECUTE_STACK
-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
-      LCT_NORMAL, VOIDmode, 1, XEXP (m_tramp, 0), Pmode);
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
+ LCT_NORMAL, VOIDmode, 1, XEXP (m_tramp, 0), Pmode);
#endif
}

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_pa_pa_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/pa/pa.h.orig Thu Jan 10 21:38:27 2013
+++ gcc/config/pa/pa.h Wed Jan 23 22:48:29 2013
@@ -312,6 +312,9 @@ typedef struct GTY(()) machine_function
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
+/* Make local arrays of chars word-aligned for the same reasons. */
+#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN)
+
/* Set this nonzero if move instructions will actually fail to work
when given unaligned data. */
#define STRICT_ALIGNMENT 1

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_driver-rs6000_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/rs6000/driver-rs6000.c.orig Thu Jan 24 21:13:07 2013
+++ gcc/config/rs6000/driver-rs6000.c Thu Jan 24 21:16:05 2013
@@ -40,6 +40,8 @@ const char *host_detect_local_cpu (int argc, const cha
#if GCC_VERSION >= 0
+#if defined(_AIX) || defined(__APPLE__) || defined(__FreeBSD__) || \
+ defined(__linux__)
/* Returns parameters that describe L1_ASSOC associative cache of size
L1_SIZEKB with lines of size L1_LINE, and L2_SIZEKB. */
@@ -58,6 +60,7 @@ describe_cache (unsigned l1_sizekb, unsigned l1_line,
return concat (l1size, " ", line, " ", l2size, " ", NULL);
}
+#endif
#ifdef __APPLE__

View File

@ -1,28 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_openbsd1_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/rs6000/openbsd1.h.orig Tue Jun 12 14:05:16 2007
+++ gcc/config/rs6000/openbsd1.h Tue Jun 12 14:05:16 2007
@@ -0,0 +1,24 @@
+/* Configuration file for an rs6000 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_CORRECT_SPECS
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+#define OBSD_HAS_DECLARE_OBJECT

View File

@ -1,133 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_openbsd_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/rs6000/openbsd.h.orig Fri Nov 15 12:47:25 2013
+++ gcc/config/rs6000/openbsd.h Fri Nov 15 12:49:07 2013
@@ -0,0 +1,129 @@
+/* Configuration file for an rs6000 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* XXX need to check ASM_WEAKEN_LABEL/ASM_GLOBALIZE_LABEL. */
+
+/* Run-time target specifications. */
+#undef TARGET_OS_CPP_BUILTINS /* FIXME: sysv4.h should not define this! */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ OPENBSD_OS_CPP_BUILTINS_ELF(); \
+ builtin_define ("__PPC"); \
+ builtin_define ("__PPC__"); \
+ builtin_define ("__powerpc"); \
+ builtin_define ("__powerpc__"); \
+ builtin_assert ("cpu=powerpc"); \
+ builtin_assert ("machine=powerpc"); \
+ } \
+ while (0)
+
+/* Override the default from rs6000.h to avoid conflicts with macros
+ defined in OpenBSD header files. */
+
+#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
+#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
+ do \
+ { \
+ if (BYTES_BIG_ENDIAN) \
+ { \
+ builtin_define ("__BIG_ENDIAN__"); \
+ builtin_assert ("machine=bigendian"); \
+ } \
+ else \
+ { \
+ builtin_define ("__LITTLE_ENDIAN__"); \
+ builtin_assert ("machine=littleendian"); \
+ } \
+ } \
+ while (0)
+
+#undef CPP_OS_DEFAULT_SPEC
+#define CPP_OS_DEFAULT_SPEC "%(cpp_os_openbsd)"
+
+#undef LINK_SPEC
+#define LINK_SPEC "%{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}} \
+ %{static:-static}}"
+
+#undef LIB_DEFAULT_SPEC
+#define LIB_DEFAULT_SPEC "%(lib_openbsd)"
+
+#undef STARTFILE_DEFAULT_SPEC
+#define STARTFILE_DEFAULT_SPEC "%(startfile_openbsd)"
+
+#undef CRTSAVRES_DEFAULT_SPEC
+#define CRTSAVRES_DEFAULT_SPEC ""
+
+#undef ENDFILE_DEFAULT_SPEC
+#define ENDFILE_DEFAULT_SPEC "%(endfile_openbsd)"
+
+#undef LINK_START_DEFAULT_SPEC
+#define LINK_START_DEFAULT_SPEC "%(link_start_openbsd)"
+
+#undef LINK_OS_DEFAULT_SPEC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_openbsd)"
+
+/* Default ABI to use */
+#undef RS6000_ABI_NAME
+#define RS6000_ABI_NAME "openbsd"
+
+/* Define this macro as a C expression for the initializer of an
+ array of string to tell the driver program which options are
+ defaults for this target and thus do not need to be handled
+ specially when using `MULTILIB_OPTIONS'.
+
+ Do not define this macro if `MULTILIB_OPTIONS' is not defined in
+ the target makefile fragment or if none of the options listed in
+ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
+
+#undef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS { "mbig", "mcall-openbsd" }
+
+/* collect2 support (Macros for initialization). */
+
+
+/* Don't tell collect2 we use COFF as we don't have (yet ?) a dynamic ld
+ library with the proper functions to handle this -> collect2 will
+ default to using nm. */
+#undef OBJECT_FORMAT_COFF
+
+/* Some code gets optimized incorrectly by move_movables() in loop.c */
+#define BROKEN_MOVE_MOVABLES_P
+
+/* This must agree with <machine/_types.h> */
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef TRAMPOLINE_SIZE
+#define TRAMPOLINE_SIZE 40
+

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_rs6000_c,v 1.2 2016/09/01 17:30:33 pascal Exp $
Disable code which passes ".machine ppc" to the assembler as it breaks
use of some CPU features. Notably breaks -maltivec which breaks build of
Mozilla ports including xulrunner.
Borrowed from https://github.com/sba1/adtools/commit/b24ae065714a2390d7718d2c348fe5cfa40c2b48
--- gcc/config/rs6000/rs6000.c.orig Thu Feb 4 14:59:27 2016
+++ gcc/config/rs6000/rs6000.c Sat Aug 6 19:19:05 2016
@@ -5006,6 +5006,8 @@ rs6000_file_start (void)
if (rs6000_default_cpu == 0 || rs6000_default_cpu[0] == '\0'
|| !global_options_set.x_rs6000_cpu_index)
{
+ /* Temporarily disabled as it overrides e.g., -mcpu=440 and -maltivec */
+#if 0
fputs ("\t.machine ", asm_out_file);
if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0)
fputs ("power8\n", asm_out_file);
@@ -5021,6 +5023,7 @@ rs6000_file_start (void)
fputs ("ppc64\n", asm_out_file);
else
fputs ("ppc\n", asm_out_file);
+#endif
}
#endif
}

View File

@ -1,38 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_sysv4_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/rs6000/sysv4.h.orig Thu Jul 24 19:25:19 2014
+++ gcc/config/rs6000/sysv4.h Fri Jul 8 18:18:15 2016
@@ -381,6 +381,7 @@ do { \
asm_fprintf (FILE, "%L%s", PREFIX)
/* Globalizing directive for a label. */
+#undef GLOBAL_ASM_OP
#define GLOBAL_ASM_OP "\t.globl "
/* This says how to output assembler code to declare an
@@ -813,13 +814,14 @@ ncrtn.o%s"
/* OpenBSD support. */
#ifndef LIB_OPENBSD_SPEC
-#define LIB_OPENBSD_SPEC "%{!shared:%{pthread:-lpthread%{p:_p}%{!p:%{pg:_p}}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
+#define LIB_OPENBSD_SPEC OBSD_LIB_SPEC
#endif
#ifndef STARTFILE_OPENBSD_SPEC
#define STARTFILE_OPENBSD_SPEC "\
-%{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} \
-%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+%{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+%{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} %{!nopie:rcrt0%O%s}}}} \
+crtbegin%O%s} %{shared:crtbeginS%O%s}"
#endif
#ifndef ENDFILE_OPENBSD_SPEC
@@ -836,7 +838,7 @@ ncrtn.o%s"
#endif
#ifndef CPP_OS_OPENBSD_SPEC
-#define CPP_OS_OPENBSD_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}"
+#define CPP_OS_OPENBSD_SPEC OBSD_CPP_SPEC
#endif
/* Define any extra SPECS that the compiler needs to generate. */

View File

@ -1,52 +0,0 @@
$OpenBSD: patch-gcc_config_rs6000_t-openbsd,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/config/rs6000/t-openbsd.orig Mon Nov 14 12:16:44 2011
+++ gcc/config/rs6000/t-openbsd Mon Nov 14 13:23:24 2011
@@ -0,0 +1,48 @@
+# include t-rs6000 too
+# this is taken from t-ppccomm
+# but crt* removed.
+
+
+LIB2FUNCS_EXTRA = tramp.S
+
+# This one can't end up in shared libgcc
+LIB2FUNCS_STATIC_EXTRA = eabi.S
+
+# We want fine grained libraries, so use the new code to build the
+# floating point emulation libraries.
+FPBIT = fp-bit.c
+DPBIT = dp-bit.c
+
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+ cat $(srcdir)/config/fp-bit.c > dp-bit.c
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define FLOAT' > fp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+eabi.S: $(srcdir)/config/rs6000/eabi.asm
+ cat $(srcdir)/config/rs6000/eabi.asm > eabi.S
+
+tramp.S: $(srcdir)/config/rs6000/tramp.asm
+ cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
+
+# Switch synonyms
+MULTILIB_MATCHES_FLOAT = msoft-float=mcpu?401 \
+ msoft-float=mcpu?403 \
+ msoft-float=mcpu?ec603e \
+ msoft-float=mcpu?801 \
+ msoft-float=mcpu?821 \
+ msoft-float=mcpu?823 \
+ msoft-float=mcpu?860
+MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
+MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
+CRTSTUFF_T_CFLAGS = -msdata=none
+# Make sure crt*.o are built with -fPIC even if configured with
+# --enable-shared --disable-multilib
+CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none

View File

@ -1,80 +0,0 @@
$OpenBSD: patch-gcc_config_sparc_openbsd64_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/sparc/openbsd64.h.orig Thu Jan 2 23:23:26 2014
+++ gcc/config/sparc/openbsd64.h Thu Jul 7 21:42:18 2016
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
/* XXX - do we really want HARD_QUAD? */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
-(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
+(MASK_V9 + MASK_PTR64 + MASK_64BIT + /* MASK_HARD_QUAD */ \
+ MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
#undef SPARC_DEFAULT_CMODEL
@@ -30,10 +30,7 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
- builtin_define ("__unix__"); \
- builtin_define ("__OpenBSD__"); \
- builtin_assert ("system=unix"); \
- builtin_assert ("system=OpenBSD"); \
+ OPENBSD_OS_CPP_BUILTINS(); \
builtin_define ("__sparc64__"); \
builtin_define ("__sparcv9__"); \
builtin_define ("__sparc_v9__"); \
@@ -41,14 +38,18 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
-/* Inherited from sp64-elf. */
-#undef NO_IMPLICIT_EXTERN_C
-
#undef ASM_SPEC
+#ifdef PIE_DEFAULT
#define ASM_SPEC "\
+-s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \
+%(asm_cpu) %(asm_arch) \
+"
+#else
+#define ASM_SPEC "\
-s %{fpic|fPIC|fpie|fPIE:-K PIC} \
%(asm_cpu) %(asm_arch) \
"
+#endif
/* Layout of source language data types. */
#undef WCHAR_TYPE
@@ -57,6 +58,15 @@ along with GCC; see the file COPYING3. If not see
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128
@@ -66,13 +76,15 @@ along with GCC; see the file COPYING3. If not see
%{shared:-shared} %{R*} \
%{static:-Bstatic} \
%{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
%{assert*} \
-dynamic-linker /usr/libexec/ld.so"
/* As an elf system, we need crtbegin/crtend stuff. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"

View File

@ -1,100 +0,0 @@
$OpenBSD: patch-gcc_config_sparc_openbsd_h,v 1.2 2016/07/14 07:22:31 tobiasu Exp $
--- gcc/config/sparc/openbsd.h.orig Thu Jul 7 19:09:32 2016
+++ gcc/config/sparc/openbsd.h Thu Jul 7 21:41:00 2016
@@ -0,0 +1,96 @@
+/* Configuration file for sparc OpenBSD target.
+ Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+/* Target OS builtins. */
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ OPENBSD_OS_CPP_BUILTINS(); \
+ } \
+ while (0)
+
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
+
+#undef MD_EXEC_PREFIX
+#undef MD_STARTFILE_PREFIX
+
+#undef ASM_SPEC
+#ifdef PIE_DEFAULT
+#define ASM_SPEC "\
+%{v:-V} -s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+#else
+#define ASM_SPEC "\
+%{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+#endif
+
+/* Layout of source language data types. */
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef WINT_TYPE
+#define WINT_TYPE "int"
+
+#undef INTMAX_TYPE
+#define INTMAX_TYPE "long long int"
+
+#undef UINTMAX_TYPE
+#define UINTMAX_TYPE "long long unsigned int"
+
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{rdynamic:-export-dynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
+
+/* We use GNU ld so undefine this so that attribute((init_priority)) works. */
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_config_sparc_sparc_c,v 1.3 2016/09/01 17:30:33 pascal Exp $
--- gcc/config/sparc/sparc.c.orig Tue Apr 12 22:56:11 2016
+++ gcc/config/sparc/sparc.c Sat Aug 6 19:19:05 2016
@@ -5581,6 +5581,9 @@ sparc_expand_prologue (void)
if (crtl->uses_pic_offset_table)
load_got_register ();
+ if (warn_stack_larger_than && size > stack_larger_than_size)
+ warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", size);
+
/* Advertise that the data calculated just above are now valid. */
sparc_prologue_data_valid_p = true;
}

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-gcc_configure,v 1.5 2016/09/01 17:30:33 pascal Exp $
--- gcc/configure.orig Sun May 22 10:53:32 2016
+++ gcc/configure Sat Aug 6 19:19:05 2016
@@ -17367,7 +17367,7 @@ openbsd*)
*) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
@@ -21027,7 +21027,7 @@ openbsd*)
*) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
@@ -27522,6 +27522,7 @@ else
fi
;;
+ *-*-openbsd*) gcc_cv_libc_provides_ssp=yes ;;
*) gcc_cv_libc_provides_ssp=no ;;
esac
fi

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_cp_g++spec_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/cp/g++spec.c.orig Thu Nov 28 13:27:58 2013
+++ gcc/cp/g++spec.c Mon Dec 2 12:20:03 2013
@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
#endif
#ifndef LIBSTDCXX
-#define LIBSTDCXX "stdc++"
+#define LIBSTDCXX "estdc++"
#endif
#ifndef LIBSTDCXX_PROFILE
#define LIBSTDCXX_PROFILE LIBSTDCXX

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_cppbuiltin_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/cppbuiltin.c
--- gcc/cppbuiltin.c.orig
+++ gcc/cppbuiltin.c
@@ -129,7 +129,7 @@ static void
define_builtin_macros_for_type_sizes (cpp_reader *pfile)
{
#define define_type_sizeof(NAME, TYPE) \
- cpp_define_formatted (pfile, NAME"="HOST_WIDE_INT_PRINT_DEC, \
+ cpp_define_formatted (pfile, NAME"=" HOST_WIDE_INT_PRINT_DEC, \
tree_to_uhwi (TYPE_SIZE_UNIT (TYPE)))
define_type_sizeof ("__SIZEOF_INT__", integer_type_node);

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-gcc_defaults_h,v 1.2 2018/04/15 23:39:26 jca Exp $
Index: gcc/defaults.h
--- gcc/defaults.h.orig
+++ gcc/defaults.h
@@ -123,7 +123,7 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
{ \
fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \
assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
+ fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED ",%u\n", \
(SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
} \
while (0)
@@ -1386,6 +1386,10 @@ see the files COPYING3 and COPYING.RUNTIME respectivel
#ifndef SWITCHABLE_TARGET
#define SWITCHABLE_TARGET 0
+#endif
+
+#ifndef PIE_DEFAULT
+#define PIE_DEFAULT 0
#endif
#endif /* GCC_INSN_FLAGS_H */

View File

@ -1,39 +0,0 @@
$OpenBSD: patch-gcc_dwarf2cfi_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/dwarf2cfi.c
--- gcc/dwarf2cfi.c.orig
+++ gcc/dwarf2cfi.c
@@ -3176,7 +3176,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
case DW_CFA_offset_extended:
case DW_CFA_offset_extended_sf:
r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1);
- fprintf (f, "\t.cfi_offset %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
+ fprintf (f, "\t.cfi_offset %lu, " HOST_WIDE_INT_PRINT_DEC "\n",
r, cfi->dw_cfi_oprnd2.dw_cfi_offset);
break;
@@ -3199,7 +3199,7 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
case DW_CFA_def_cfa:
case DW_CFA_def_cfa_sf:
r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 1);
- fprintf (f, "\t.cfi_def_cfa %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
+ fprintf (f, "\t.cfi_def_cfa %lu, " HOST_WIDE_INT_PRINT_DEC "\n",
r, cfi->dw_cfi_oprnd2.dw_cfi_offset);
break;
@@ -3234,13 +3234,13 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi)
fprintf (f, "\t.cfi_escape %#x,", DW_CFA_GNU_args_size);
dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
if (flag_debug_asm)
- fprintf (f, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
+ fprintf (f, "\t%s args_size " HOST_WIDE_INT_PRINT_DEC,
ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_offset);
fputc ('\n', f);
}
else
{
- fprintf (f, "\t.cfi_GNU_args_size "HOST_WIDE_INT_PRINT_DEC "\n",
+ fprintf (f, "\t.cfi_GNU_args_size " HOST_WIDE_INT_PRINT_DEC "\n",
cfi->dw_cfi_oprnd1.dw_cfi_offset);
}
break;

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-gcc_dwarf2out_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/dwarf2out.c
--- gcc/dwarf2out.c.orig
+++ gcc/dwarf2out.c
@@ -5324,8 +5324,8 @@ print_die (dw_die_ref die, FILE *outfile)
fprintf (outfile, HOST_WIDE_INT_PRINT_UNSIGNED, AT_unsigned (a));
break;
case dw_val_class_const_double:
- fprintf (outfile, "constant ("HOST_WIDE_INT_PRINT_DEC","\
- HOST_WIDE_INT_PRINT_UNSIGNED")",
+ fprintf (outfile, "constant (" HOST_WIDE_INT_PRINT_DEC ","\
+ HOST_WIDE_INT_PRINT_UNSIGNED ")",
a->dw_attr_val.v.val_double.high,
a->dw_attr_val.v.val_double.low);
break;

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-gcc_flags_h,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/flags.h.orig Thu Jan 10 21:38:27 2013
+++ gcc/flags.h Wed Jan 23 22:48:29 2013
@@ -25,6 +25,11 @@ along with GCC; see the file COPYING3. If not see
#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
+/* Nonzero means warn about any function whose stack usage is larger than N
+ bytes. The value N is `stack_larger_than_size'. */
+extern int warn_stack_larger_than;
+extern HOST_WIDE_INT stack_larger_than_size;
+
/* Names of debug_info_type, for error messages. */
extern const char *const debug_type_names[];

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-gcc_fortran_f95-lang_c,v 1.2 2014/08/18 07:42:11 pascal Exp $
--- gcc/fortran/f95-lang.c.orig Mon Jun 30 18:35:48 2014
+++ gcc/fortran/f95-lang.c Wed Jul 16 18:37:33 2014
@@ -1121,6 +1121,11 @@ gfc_maybe_initialize_eh (void)
using_eh_for_cleanups ();
}
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
#include "gt-fortran-f95-lang.h"
#include "gtype-fortran.h"

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-gcc_gcc_c,v 1.2 2014/11/20 19:54:40 pascal Exp $
--- gcc/gcc.c.orig Wed Oct 22 23:42:48 2014
+++ gcc/gcc.c Fri Oct 31 11:59:54 2014
@@ -678,7 +678,7 @@ proper position among the other output files. */
#ifndef LINK_PIE_SPEC
#ifdef HAVE_LD_PIE
-#define LINK_PIE_SPEC "%{pie:-pie} "
+#define LINK_PIE_SPEC "%{pie:-pie} %{p|pg|nopie:-nopie} "
#else
#define LINK_PIE_SPEC "%{pie:} "
#endif

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-gcc_go_go-lang_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/go/go-lang.c.orig Thu Jan 2 23:23:26 2014
+++ gcc/go/go-lang.c Fri Feb 14 20:24:54 2014
@@ -458,6 +458,12 @@ go_localize_identifier (const char *ident)
return identifier_to_locale (ident);
}
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
+
#undef LANG_HOOKS_NAME
#undef LANG_HOOKS_INIT
#undef LANG_HOOKS_OPTION_LANG_MASK

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_ipa-devirt_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/ipa-devirt.c
--- gcc/ipa-devirt.c.orig
+++ gcc/ipa-devirt.c
@@ -1634,7 +1634,7 @@ dump_possible_polymorphic_call_targets (FILE *f,
{
fprintf (f, " Contained in type:");
print_generic_expr (f, ctx.outer_type, TDF_SLIM);
- fprintf (f, " at offset "HOST_WIDE_INT_PRINT_DEC"\n",
+ fprintf (f, " at offset " HOST_WIDE_INT_PRINT_DEC "\n",
ctx.offset);
}

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_ipa-inline_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/ipa-inline.c
--- gcc/ipa-inline.c.orig
+++ gcc/ipa-inline.c
@@ -1727,7 +1727,7 @@ inline_small_functions (void)
badness,
edge->frequency / (double)CGRAPH_FREQ_BASE);
if (edge->count)
- fprintf (dump_file," Called "HOST_WIDEST_INT_PRINT_DEC"x\n",
+ fprintf (dump_file," Called " HOST_WIDEST_INT_PRINT_DEC "x\n",
edge->count);
if (dump_flags & TDF_DETAILS)
edge_badness (edge, true);

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-gcc_ipa-profile_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/ipa-profile.c
--- gcc/ipa-profile.c.orig
+++ gcc/ipa-profile.c
@@ -163,7 +163,7 @@ dump_histogram (FILE *file, vec<histogram_entry *> his
{
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
- fprintf (file, " "HOST_WIDEST_INT_PRINT_DEC": time:%i (%2.2f) size:%i (%2.2f)\n",
+ fprintf (file, " " HOST_WIDEST_INT_PRINT_DEC ": time:%i (%2.2f) size:%i (%2.2f)\n",
(HOST_WIDEST_INT) histogram[i]->count,
histogram[i]->time,
cumulated_time * 100.0 / overall_time,
@@ -516,7 +516,7 @@ ipa_profile (void)
{
gcov_type min, cumulated_time = 0, cumulated_size = 0;
- fprintf (dump_file, "Overall time: "HOST_WIDEST_INT_PRINT_DEC"\n",
+ fprintf (dump_file, "Overall time: " HOST_WIDEST_INT_PRINT_DEC "\n",
(HOST_WIDEST_INT)overall_time);
min = get_hot_bb_threshold ();
for (i = 0; i < (int)histogram.length () && histogram[i]->count >= min;
@@ -525,7 +525,7 @@ ipa_profile (void)
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
- fprintf (dump_file, "GCOV min count: "HOST_WIDEST_INT_PRINT_DEC
+ fprintf (dump_file, "GCOV min count: " HOST_WIDEST_INT_PRINT_DEC
" Time:%3.2f%% Size:%3.2f%%\n",
(HOST_WIDEST_INT)min,
cumulated_time * 100.0 / overall_time,
@@ -551,7 +551,7 @@ ipa_profile (void)
cumulated_time += histogram[i]->count * histogram[i]->time;
cumulated_size += histogram[i]->size;
}
- fprintf (dump_file, "Determined min count: "HOST_WIDEST_INT_PRINT_DEC
+ fprintf (dump_file, "Determined min count: " HOST_WIDEST_INT_PRINT_DEC
" Time:%3.2f%% Size:%3.2f%%\n",
(HOST_WIDEST_INT)threshold,
cumulated_time * 100.0 / overall_time,

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-gcc_ipa-prop_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/ipa-prop.c
--- gcc/ipa-prop.c.orig
+++ gcc/ipa-prop.c
@@ -244,7 +244,7 @@ ipa_print_node_jump_functions_for_edge (FILE *f, struc
{
fprintf (f, "KNOWN TYPE: base ");
print_generic_expr (f, jump_func->value.known_type.base_type, 0);
- fprintf (f, ", offset "HOST_WIDE_INT_PRINT_DEC", component ",
+ fprintf (f, ", offset " HOST_WIDE_INT_PRINT_DEC ", component ",
jump_func->value.known_type.offset);
print_generic_expr (f, jump_func->value.known_type.component_type, 0);
fprintf (f, "\n");
@@ -284,7 +284,7 @@ ipa_print_node_jump_functions_for_edge (FILE *f, struc
else if (type == IPA_JF_ANCESTOR)
{
fprintf (f, "ANCESTOR: ");
- fprintf (f, "%d, offset "HOST_WIDE_INT_PRINT_DEC", ",
+ fprintf (f, "%d, offset " HOST_WIDE_INT_PRINT_DEC ", ",
jump_func->value.ancestor.formal_id,
jump_func->value.ancestor.offset);
print_generic_expr (f, jump_func->value.ancestor.type, 0);

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_java_lang_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/java/lang.c.orig Mon Oct 14 18:15:38 2013
+++ gcc/java/lang.c Mon Dec 2 12:20:03 2013
@@ -922,4 +922,10 @@ java_eh_personality (void)
return java_eh_personality_decl;
}
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
+
#include "gt-java-lang.h"

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_loop-iv_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/loop-iv.c
--- gcc/loop-iv.c.orig
+++ gcc/loop-iv.c
@@ -2297,7 +2297,7 @@ determine_max_iter (struct loop *loop, struct niter_de
if (andmax)
nmax = MIN (nmax, andmax);
if (dump_file)
- fprintf (dump_file, ";; Determined upper bound "HOST_WIDEST_INT_PRINT_DEC".\n",
+ fprintf (dump_file, ";; Determined upper bound " HOST_WIDEST_INT_PRINT_DEC ".\n",
nmax);
return nmax;
}

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-gcc_lto_lto_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/lto/lto.c.orig Wed Mar 19 12:35:59 2014
+++ gcc/lto/lto.c Wed Apr 23 12:49:03 2014
@@ -3102,6 +3102,12 @@ read_cgraph_and_symbols (unsigned nfiles, const char *
all_file_decl_data = NULL;
}
+const char *
+fname_as_string(int pretty_p __attribute__((__unused__)))
+{
+ return NULL;
+}
+
/* Materialize all the bodies for all the nodes in the callgraph. */

View File

@ -1,51 +0,0 @@
$OpenBSD: patch-gcc_opts_c,v 1.3 2015/02/03 20:32:12 pascal Exp $
--- gcc/opts.c.orig Thu Oct 16 15:49:11 2014
+++ gcc/opts.c Sun Feb 1 19:27:27 2015
@@ -50,6 +50,9 @@ const char *const debug_type_names[] =
((strncmp (prefix, string, sizeof prefix - 1) == 0) \
? ((string += sizeof prefix - 1), 1) : 0)
+int warn_stack_larger_than;
+HOST_WIDE_INT stack_larger_than_size;
+
void
set_struct_debug_option (struct gcc_options *opts, location_t loc,
const char *spec)
@@ -476,8 +479,6 @@ static const struct default_options default_options_ta
{ OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_fschedule_insns, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 },
#endif
- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 },
- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 },
@@ -499,6 +500,7 @@ static const struct default_options default_options_ta
{ OPT_LEVELS_2_PLUS, OPT_fisolate_erroneous_paths_dereference, NULL, 1 },
/* -O3 optimizations. */
+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 },
/* Inlining of functions reducing size is a good idea with -Os
@@ -716,6 +718,8 @@ finish_options (struct gcc_options *opts, struct gcc_o
if (!opts->x_flag_opts_finished)
{
+ if (opts->x_flag_pic || opts->x_profile_flag)
+ opts->x_flag_pie = 0;
if (opts->x_flag_pie)
opts->x_flag_pic = opts->x_flag_pie;
if (opts->x_flag_pic && !opts->x_flag_pie)
@@ -1584,6 +1588,11 @@ common_handle_option (struct gcc_options *opts,
case OPT_Wframe_larger_than_:
opts->x_frame_larger_than_size = value;
opts->x_warn_frame_larger_than = value != -1;
+ break;
+
+ case OPT_Wstack_larger_than_:
+ stack_larger_than_size = value;
+ warn_stack_larger_than = stack_larger_than_size != -1;
break;
case OPT_Wstack_usage_:

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_profile_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/profile.c
--- gcc/profile.c.orig
+++ gcc/profile.c
@@ -318,7 +318,7 @@ is_edge_inconsistent (vec<edge, va_gc> *edges)
if (dump_file)
{
fprintf (dump_file,
- "Edge %i->%i is inconsistent, count"HOST_WIDEST_INT_PRINT_DEC,
+ "Edge %i->%i is inconsistent, count" HOST_WIDEST_INT_PRINT_DEC,
e->src->index, e->dest->index, e->count);
dump_bb (dump_file, e->src, 0, TDF_DETAILS);
dump_bb (dump_file, e->dest, 0, TDF_DETAILS);

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-gcc_stor-layout_c,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/stor-layout.c
--- gcc/stor-layout.c.orig
+++ gcc/stor-layout.c
@@ -236,7 +236,7 @@ self_referential_size (tree size)
fntype = build_function_type (return_type, param_type_list);
/* Build the function declaration. */
- sprintf (buf, "SZ"HOST_WIDE_INT_PRINT_UNSIGNED, fnno++);
+ sprintf (buf, "SZ" HOST_WIDE_INT_PRINT_UNSIGNED, fnno++);
fnname = get_file_function_name (buf);
fndecl = build_decl (input_location, FUNCTION_DECL, fnname, fntype);
for (t = param_decl_list; t; t = DECL_CHAIN (t))

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-gcc_system_h,v 1.1 2018/04/15 23:39:26 jca Exp $
Index: gcc/system.h
--- gcc/system.h.orig
+++ gcc/system.h
@@ -231,6 +231,7 @@ extern int errno;
file uses a standard library header that includes <cstdlib>, we will get
an error about 'using std::malloc'. */
#ifdef __cplusplus
+#include <new>
#include <cstdlib>
#endif

View File

@ -1,150 +0,0 @@
$OpenBSD: patch-gcc_targhooks_c,v 1.1.1.1 2014/06/26 16:30:17 pascal Exp $
--- gcc/targhooks.c.orig Fri Nov 29 13:12:39 2013
+++ gcc/targhooks.c Mon Dec 2 12:20:03 2013
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "varasm.h"
#include "expr.h"
#include "output.h"
+#include "c-family/c-common.h"
#include "diagnostic-core.h"
#include "function.h"
#include "target.h"
@@ -663,7 +664,7 @@ default_stack_protect_guard (void)
rtx x;
t = build_decl (UNKNOWN_LOCATION,
- VAR_DECL, get_identifier ("__stack_chk_guard"),
+ VAR_DECL, get_identifier ("__guard_local"),
ptr_type_node);
TREE_STATIC (t) = 1;
TREE_PUBLIC (t) = 1;
@@ -672,6 +673,8 @@ default_stack_protect_guard (void)
TREE_THIS_VOLATILE (t) = 1;
DECL_ARTIFICIAL (t) = 1;
DECL_IGNORED_P (t) = 1;
+ DECL_VISIBILITY (t) = VISIBILITY_HIDDEN;
+ DECL_VISIBILITY_SPECIFIED (t) = 1;
/* Do not share RTL as the declaration is visible outside of
current function. */
@@ -684,67 +687,72 @@ default_stack_protect_guard (void)
return t;
}
-static GTY(()) tree stack_chk_fail_decl;
+static GTY(()) int stack_protect_labelno;
tree
default_external_stack_protect_fail (void)
{
- tree t = stack_chk_fail_decl;
+ tree t, func, type, init, stack_smash_handler;
+ const char *tmp_name;
+ char *name;
+ size_t length;
+ char name_buf[32];
- if (t == NULL_TREE)
- {
- t = build_function_type_list (void_type_node, NULL_TREE);
- t = build_decl (UNKNOWN_LOCATION,
- FUNCTION_DECL, get_identifier ("__stack_chk_fail"), t);
- TREE_STATIC (t) = 1;
- TREE_PUBLIC (t) = 1;
- DECL_EXTERNAL (t) = 1;
- TREE_USED (t) = 1;
- TREE_THIS_VOLATILE (t) = 1;
- TREE_NOTHROW (t) = 1;
- DECL_ARTIFICIAL (t) = 1;
- DECL_IGNORED_P (t) = 1;
- DECL_VISIBILITY (t) = VISIBILITY_DEFAULT;
- DECL_VISIBILITY_SPECIFIED (t) = 1;
+ name = (char *)xmalloc(32);
+ if (NULL == (tmp_name = fname_as_string (0))) {
+ strlcpy (name, "*unknown*", 32);
+ } else {
+ strlcpy (name, tmp_name, 32);
+ }
+
+ length = strlen (name);
+ /* Build a decl for __func__. */
+ type = build_array_type (char_type_node,
+ build_index_type (size_int (length)));
+ type = build_qualified_type (type, TYPE_QUAL_CONST);
- stack_chk_fail_decl = t;
- }
+ init = build_string (length + 1, name);
+ free ((char *) name);
+ TREE_TYPE (init) = type;
- return build_call_expr (t, 0);
+ func = build_decl (UNKNOWN_LOCATION, VAR_DECL, NULL_TREE, type);
+ TREE_STATIC (func) = 1;
+ TREE_READONLY (func) = 1;
+ DECL_ARTIFICIAL (func) = 1;
+ ASM_GENERATE_INTERNAL_LABEL (name_buf, "LSSH", stack_protect_labelno++);
+ DECL_NAME (func) = get_identifier (name_buf);
+ DECL_INITIAL (func) = init;
+
+ assemble_variable (func, 0, 0, 0);
+
+ /* Build a decl for __stack_smash_handler. */
+ t = build_pointer_type (TREE_TYPE (func));
+ t = build_function_type_list (void_type_node, t, NULL_TREE);
+ t = build_decl (UNKNOWN_LOCATION,
+ FUNCTION_DECL, get_identifier ("__stack_smash_handler"), t);
+ /* t = build_fn_decl ("__stack_smash_handler", t); */
+ TREE_STATIC (t) = 1;
+ TREE_PUBLIC (t) = 1;
+ DECL_EXTERNAL (t) = 1;
+ TREE_USED (t) = 1;
+ TREE_THIS_VOLATILE (t) = 1;
+ TREE_NOTHROW (t) = 1;
+ DECL_ARTIFICIAL (t) = 1;
+ DECL_IGNORED_P (t) = 1;
+ DECL_VISIBILITY (t) = VISIBILITY_DEFAULT;
+ DECL_VISIBILITY_SPECIFIED (t) = 1;
+
+ stack_smash_handler = t;
+
+ /* Generate a call to __stack_smash_handler(__func__). */
+ t = build_fold_addr_expr (func);
+ return build_call_expr (stack_smash_handler, 1, t);
}
tree
default_hidden_stack_protect_fail (void)
{
-#ifndef HAVE_GAS_HIDDEN
return default_external_stack_protect_fail ();
-#else
- tree t = stack_chk_fail_decl;
-
- if (!flag_pic)
- return default_external_stack_protect_fail ();
-
- if (t == NULL_TREE)
- {
- t = build_function_type_list (void_type_node, NULL_TREE);
- t = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
- get_identifier ("__stack_chk_fail_local"), t);
- TREE_STATIC (t) = 1;
- TREE_PUBLIC (t) = 1;
- DECL_EXTERNAL (t) = 1;
- TREE_USED (t) = 1;
- TREE_THIS_VOLATILE (t) = 1;
- TREE_NOTHROW (t) = 1;
- DECL_ARTIFICIAL (t) = 1;
- DECL_IGNORED_P (t) = 1;
- DECL_VISIBILITY_SPECIFIED (t) = 1;
- DECL_VISIBILITY (t) = VISIBILITY_HIDDEN;
-
- stack_chk_fail_decl = t;
- }
-
- return build_call_expr (t, 0);
-#endif
}
bool

Some files were not shown because too many files have changed in this diff Show More