Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
@@ -0,0 +1,15 @@
$NetBSD: patch-mk_cfg_x86__64-apple-darwin.mk,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Ensure we can use install_name_tool to fixup after.
--- mk/cfg/x86_64-apple-darwin.mk.orig 2016-08-16 01:54:35.000000000 +0000
+++ mk/cfg/x86_64-apple-darwin.mk
@@ -13,7 +13,7 @@ CFG_GCCISH_CXXFLAGS_x86_64-apple-darwin
CFG_GCCISH_LINK_FLAGS_x86_64-apple-darwin := -dynamiclib -pthread -framework CoreServices -m64
CFG_GCCISH_DEF_FLAG_x86_64-apple-darwin := -Wl,-exported_symbols_list,
CFG_LLC_FLAGS_x86_64-apple-darwin :=
-CFG_INSTALL_NAME_x86_64-apple-darwin = -Wl,-install_name,@rpath/$(1)
+CFG_INSTALL_NAME_x86_64-apple-darwin = -Wl,-install_name,@rpath/$(1) -Wl,-headerpad_max_install_names
CFG_EXE_SUFFIX_x86_64-apple-darwin :=
CFG_WINDOWSY_x86_64-apple-darwin :=
CFG_UNIXY_x86_64-apple-darwin := 1
+23
View File
@@ -0,0 +1,23 @@
$NetBSD: patch-mk_rt.mk,v 1.2 2016/09/12 13:27:33 ryoon Exp $
Fix library location on SunOS.
--- mk/rt.mk.orig 2016-08-16 01:54:35.000000000 +0000
+++ mk/rt.mk
@@ -269,6 +269,16 @@ endif
COMPRT_DEFINES_$(1) := -DCOMPILER_RT_ENABLE_IOS=ON
endif
+ifeq ($$(findstring solaris,$(1)),solaris)
+COMPRT_DIR_$(1) := sunos
+COMPRT_LIB_NAME_$(1) := clang_rt.builtins-$$(COMPRT_ARCH_$(1))
+endif
+
+ifeq ($$(findstring netbsd,$(1)),netbsd)
+COMPRT_DIR_$(1) := netbsd
+COMPRT_LIB_NAME_$(1) := clang_rt.builtins-$$(COMPRT_ARCH_$(1))
+endif
+
ifndef COMPRT_DIR_$(1)
# NB: FreeBSD and NetBSD output to "linux"...
COMPRT_DIR_$(1) := linux
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: patch-mk_rustllvm.mk,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Ensure we can find generated LLVM includes.
--- mk/rustllvm.mk.orig 2016-07-04 18:04:09.000000000 +0000
+++ mk/rustllvm.mk
@@ -17,11 +17,9 @@ define DEF_RUSTLLVM_TARGETS
# FIXME: Lately, on windows, llvm-config --includedir is not enough
# to find the llvm includes (probably because we're not actually installing
# llvm, but using it straight out of the build directory)
-ifdef CFG_WINDOWSY_$(1)
LLVM_EXTRA_INCDIRS_$(1)= $$(call CFG_CC_INCLUDE_$(1),$(S)src/llvm/include) \
$$(call CFG_CC_INCLUDE_$(1),\
$$(CFG_LLVM_BUILD_DIR_$(1))/include)
-endif
RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, \
ExecutionEngineWrapper.cpp RustWrapper.cpp PassWrapper.cpp \
@@ -0,0 +1,20 @@
$NetBSD: patch-src_compiler-rt_lib_builtins_CMakeLists.txt,v 1.1 2016/09/12 13:27:33 ryoon Exp $
* On NetBSD, do not misdetect unwind.h
We do not support ARM build currently, so remove this unconditionally.
--- src/compiler-rt/lib/builtins/CMakeLists.txt.orig 2016-08-16 01:54:40.000000000 +0000
+++ src/compiler-rt/lib/builtins/CMakeLists.txt
@@ -159,12 +159,6 @@ if(NOT WIN32 OR MINGW)
emutls.c)
endif()
-if (HAVE_UNWIND_H)
- set(GENERIC_SOURCES
- ${GENERIC_SOURCES}
- gcc_personality_v0.c)
-endif ()
-
if (NOT MSVC)
set(x86_64_SOURCES
x86_64/chkstk.S
@@ -0,0 +1,34 @@
$NetBSD: patch-src_etc_local__stage0.sh,v 1.3 2016/09/13 12:37:08 ryoon Exp $
-Copy additional libarena required on Darwin.
-Copy GCC support libraries required on SunOS.
--- src/etc/local_stage0.sh.orig 2016-08-16 01:54:35.000000000 +0000
+++ src/etc/local_stage0.sh
@@ -18,7 +18,7 @@ LIB_PREFIX=lib
OS=`uname -s`
case $OS in
- ("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS")
+ ("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS"|"NetBSD")
BIN_SUF=
LIB_SUF=.so
;;
@@ -51,6 +51,7 @@ fi
cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
+cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}arena*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
@@ -63,6 +64,9 @@ cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}log
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rbml*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}serialize*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}term*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
+cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}gcc_s*${LIB_SUF}* ${TARG_DIR}/stage0/${LIB_DIR}/
+cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}ssp*${LIB_SUF}* ${TARG_DIR}/stage0/${LIB_DIR}/
+cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}stdc++*${LIB_SUF}* ${TARG_DIR}/stage0/${LIB_DIR}/
# do not fail if one of the above fails, as all we need is a working rustc!
exit 0
@@ -0,0 +1,31 @@
$NetBSD: patch-src_liblibc_src_unix_solaris_mod.rs,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Additional Solarish support.
--- src/liblibc/src/unix/solaris/mod.rs.orig 2016-08-16 01:54:44.000000000 +0000
+++ src/liblibc/src/unix/solaris/mod.rs
@@ -487,9 +487,13 @@ pub const SIGSEGV: ::c_int = 11;
pub const SIGPIPE: ::c_int = 13;
pub const SIGALRM: ::c_int = 14;
pub const SIGTERM: ::c_int = 15;
+pub const SIGWINCH: ::c_int = 20;
pub const WNOHANG: ::c_int = 0x40;
+pub const RTLD_NOW: ::c_int = 0x2;
+pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
+
pub const PROT_NONE: ::c_int = 0;
pub const PROT_READ: ::c_int = 1;
pub const PROT_WRITE: ::c_int = 2;
@@ -707,8 +711,8 @@ pub const IP_TTL: ::c_int = 4;
pub const IP_HDRINCL: ::c_int = 2;
pub const IP_ADD_MEMBERSHIP: ::c_int = 19;
pub const IP_DROP_MEMBERSHIP: ::c_int = 20;
-pub const IPV6_JOIN_GROUP: ::c_int = 9;
-pub const IPV6_LEAVE_GROUP: ::c_int = 10;
+pub const IPV6_ADD_MEMBERSHIP: ::c_int = 9;
+pub const IPV6_DROP_MEMBERSHIP: ::c_int = 10;
pub const TCP_NODELAY: ::c_int = 1;
pub const TCP_KEEPIDLE: ::c_int = 34;
@@ -0,0 +1,15 @@
$NetBSD: patch-src_librustc__trans_back_linker.rs,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Permit post-install install_name_tool fixup.
--- src/librustc_trans/back/linker.rs.orig 2016-08-16 01:54:35.000000000 +0000
+++ src/librustc_trans/back/linker.rs
@@ -206,6 +206,8 @@ impl<'a> Linker for GnuLinker<'a> {
self.cmd.args(&["-dynamiclib", "-Wl,-dylib"]);
if self.sess.opts.cg.rpath {
+ // Ensure we can use install_name_tool later to fixup.
+ self.cmd.arg("-Wl,-headerpad_max_install_names");
let mut v = OsString::from("-Wl,-install_name,@rpath/");
v.push(out_filename.file_name().unwrap());
self.cmd.arg(&v);
@@ -0,0 +1,19 @@
$NetBSD: patch-src_libstd_rtdeps.rs,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Support PKGSRC_USE_SSP (ugly for now).
Add umem.
--- src/libstd/rtdeps.rs.orig 2016-08-16 01:54:35.000000000 +0000
+++ src/libstd/rtdeps.rs
@@ -43,8 +43,10 @@ extern {}
#[cfg(target_os = "solaris")]
#[link(name = "socket")]
-#[link(name = "posix4")]
#[link(name = "pthread")]
+// pkgsrc hack until I can figure out how to pass it through properly
+#[link(name = "ssp")]
+#[link(name = "umem")]
extern {}
// For PNaCl targets, nacl_io is a Pepper wrapper for some IO functions
@@ -0,0 +1,14 @@
$NetBSD: patch-src_libstd_sys_unix_thread.rs,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Additional Solarish support.
--- src/libstd/sys/unix/thread.rs.orig 2016-07-04 18:04:09.000000000 +0000
+++ src/libstd/sys/unix/thread.rs
@@ -12,7 +12,6 @@ use prelude::v1::*;
use alloc::boxed::FnBox;
use cmp;
-#[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
use ffi::CStr;
use io;
use libc;
@@ -0,0 +1,14 @@
$NetBSD: patch-src_llvm_Makefile.rules,v 1.1 2016/09/06 10:36:49 jperkin Exp $
"-z discard-unused" is only supported by Oracle Solaris ld.
--- src/llvm/Makefile.rules.orig 2016-07-04 18:05:12.000000000 +0000
+++ src/llvm/Makefile.rules
@@ -644,7 +644,6 @@ ifndef NO_DEAD_STRIP
LD.Flags += -Wl,-dead_strip
else
ifeq ($(HOST_OS),SunOS)
- LD.Flags += -Wl,-z -Wl,discard-unused=sections
else
ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
LD.Flags += -Wl,--gc-sections
@@ -0,0 +1,15 @@
$NetBSD: patch-src_llvm_cmake_modules_AddLLVM.cmake,v 1.1 2016/09/06 10:36:49 jperkin Exp $
"-z discard-unused" is only supported by Oracle Solaris ld.
--- src/llvm/cmake/modules/AddLLVM.cmake.orig 2016-08-16 01:55:49.000000000 +0000
+++ src/llvm/cmake/modules/AddLLVM.cmake
@@ -175,8 +175,6 @@ function(add_link_opts target_name)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-dead_strip")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set_property(TARGET ${target_name} APPEND_STRING PROPERTY
- LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections")
elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
# Object files are compiled with -ffunction-data-sections.
# Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
@@ -0,0 +1,14 @@
$NetBSD: patch-src_llvm_lib_CodeGen_MachineDominanceFrontier.cpp,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Avoid relocation error.
--- src/llvm/lib/CodeGen/MachineDominanceFrontier.cpp.orig 2016-08-16 01:55:50.000000000 +0000
+++ src/llvm/lib/CodeGen/MachineDominanceFrontier.cpp
@@ -16,7 +16,6 @@
using namespace llvm;
namespace llvm {
-template class DominanceFrontierBase<MachineBasicBlock>;
template class ForwardDominanceFrontierBase<MachineBasicBlock>;
}
@@ -0,0 +1,15 @@
$NetBSD: patch-src_llvm_utils_buildit_build__llvm,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Shell portability fix.
--- src/llvm/utils/buildit/build_llvm.orig 2016-03-03 01:04:56.000000000 +0000
+++ src/llvm/utils/buildit/build_llvm
@@ -227,7 +227,7 @@ cd $DIR/obj-llvm || exit 1
# Install the tree into the destination directory.
make $JOBS_FLAG $COMMON_MAKEFLAGS UNIVERSAL_ARCH="$HOSTS" install
-if ! test $? == 0 ; then
+if ! test $? = 0 ; then
echo "error: LLVM 'make install' failed!"
exit 1
fi
@@ -0,0 +1,21 @@
$NetBSD: patch-src_rust-installer_gen-install-script.sh,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Do not use /bin/echo, not guaranteed to support -n.
--- src/rust-installer/gen-install-script.sh.orig 2016-07-04 18:05:18.000000000 +0000
+++ src/rust-installer/gen-install-script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
@@ -11,7 +11,7 @@
set -u
-if [ -x /bin/echo ]; then
+if [ -x /bin/donotuseecho ]; then
ECHO='/bin/echo'
else
ECHO='echo'
@@ -0,0 +1,40 @@
$NetBSD: patch-src_rust-installer_gen-installer.sh,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Do not use /bin/echo, not guaranteed to support -n.
Unset CDPATH before printing cd output.
--- src/rust-installer/gen-installer.sh.orig 2016-07-04 18:05:18.000000000 +0000
+++ src/rust-installer/gen-installer.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
@@ -11,7 +11,7 @@
set -u
-if [ -x /bin/echo ]; then
+if [ -x /bin/donotuseecho ]; then
ECHO='/bin/echo'
else
ECHO='echo'
@@ -287,7 +287,7 @@ cp -r "$CFG_IMAGE_DIR/"* "$CFG_WORK_DIR/
need_ok "couldn't copy source image"
# Create the manifest
-manifest=`(cd "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$CFG_COMPONENT_NAME" && find . -type f | sed 's/^\.\///') | sort`
+manifest=`(unset CDPATH && cd "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$CFG_COMPONENT_NAME" >/dev/null && find . -type f | sed 's/^\.\///') | sort`
# Remove files in bulk dirs
bulk_dirs=`echo "$CFG_BULK_DIRS" | tr "," " "`
@@ -324,7 +324,7 @@ echo "$rust_installer_version" > "$versi
# Copy the overlay
if [ -n "$CFG_NON_INSTALLED_OVERLAY" ]; then
- overlay_files=`(cd "$CFG_NON_INSTALLED_OVERLAY" && find . -type f)`
+ overlay_files=`(unset CDPATH && cd "$CFG_NON_INSTALLED_OVERLAY" >/dev/null && find . -type f)`
for f in $overlay_files; do
if [ -e "$CFG_WORK_DIR/$CFG_PACKAGE_NAME/$f" ]; then err "overlay $f exists"; fi
@@ -0,0 +1,27 @@
$NetBSD: patch-src_rust-installer_install-template.sh,v 1.1 2016/09/06 10:36:49 jperkin Exp $
Support SunOS.
Fix undefined variable warnings.
--- src/rust-installer/install-template.sh.orig 2016-07-04 18:05:18.000000000 +0000
+++ src/rust-installer/install-template.sh
@@ -352,6 +352,10 @@ get_host_triple() {
_ostype=apple-darwin
;;
+ SunOS)
+ _ostype=unknown-solaris
+ ;;
+
MINGW*)
_ostype=pc-windows-gnu
;;
@@ -381,7 +385,7 @@ get_host_triple() {
;;
*)
- err "unknown value from uname -s: $uname_value"
+ err "unknown value from uname -s: $_uname_value"
;;
esac