diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/illumos-boehm-gc.diff | 40 | ||||
-rw-r--r-- | debian/patches/illumos-fclone-functions.diff | 80 | ||||
-rw-r--r-- | debian/patches/illumos-multiarch.diff | 15 | ||||
-rw-r--r-- | debian/patches/illumos-pragma-align.diff | 46 | ||||
-rw-r--r-- | debian/patches/illumos-rdynamic.diff | 29 | ||||
-rw-r--r-- | debian/patches/illumos-spec.diff | 51 | ||||
-rw-r--r-- | debian/patches/illumos-strict-calling-conventions.diff | 110 | ||||
-rw-r--r-- | debian/patches/illumos-use_libgcj_bc.diff | 13 | ||||
-rw-r--r-- | debian/rules.conf | 13 | ||||
-rw-r--r-- | debian/rules.defs | 9 | ||||
-rw-r--r-- | debian/rules.patch | 11 | ||||
-rw-r--r-- | debian/rules2 | 11 |
12 files changed, 424 insertions, 4 deletions
diff --git a/debian/patches/illumos-boehm-gc.diff b/debian/patches/illumos-boehm-gc.diff new file mode 100644 index 0000000..e8ec1f5 --- /dev/null +++ b/debian/patches/illumos-boehm-gc.diff @@ -0,0 +1,40 @@ +Description: changes to libgcj.ver fix crashes of programs using boehm-gc. + Defining SOLARIS_STACKBOTTOM makes use of a native way to get stack bottom + (with thr_stksegment()) +Index: gcc-49/src/boehm-gc/include/private/gcconfig.h +=================================================================== +--- gcc-49.orig/src/boehm-gc/include/private/gcconfig.h ++++ gcc-49/src/boehm-gc/include/private/gcconfig.h +@@ -2114,7 +2114,7 @@ + /* HEURISTIC2 probably works, but this appears to be preferable. */ + /* # include <sys/vm.h> */ + /* # define STACKBOTTOM USRSTACK */ +-# define HEURISTIC2 ++# define SOLARIS_STACKBOTTOM + # define PROC_VDB + # define DYNAMIC_LOADING + # if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) +Index: gcc-49/src/libjava/libgcj.ver +=================================================================== +--- gcc-49.orig/src/libjava/libgcj.ver ++++ gcc-49/src/libjava/libgcj.ver +@@ -9,6 +9,19 @@ + __gcj_personality_sj0; + __gcj_personality_seh0; + _Z*; ++ ++# https://sourceware.org/ml/binutils/2010-02/msg00457.html ++# Otherwise boehm-gc cannot determine memory borders ++# and Java executables randomly crash ++# GNU ld add these symbols by default, but not in case ++# when version script is specified. ++ _GLOBAL_OFFSET_TABLE_; ++ _etext; ++ _DYNAMIC; ++ _edata; ++ _end; ++ _PROCEDURE_LINKAGE_TABLE_; ++ + local: + *; + }; diff --git a/debian/patches/illumos-fclone-functions.diff b/debian/patches/illumos-fclone-functions.diff new file mode 100644 index 0000000..a3d3c04 --- /dev/null +++ b/debian/patches/illumos-fclone-functions.diff @@ -0,0 +1,80 @@ +From 30f4861499309bd81f1d59b41b1091fef0152680 Mon Sep 17 00:00:00 2001 +From: Richard Lowe <richlowe@richlowe.net> +Date: Sun, 30 Sep 2012 16:44:14 -0400 +Subject: [PATCH] allow the global disabling of function cloning + +Optimizations which clone functions to create call-specific implementations +which may be better optimized also dissociate these functions from their +symbol names in ways harmful to tracing and debugging (since there are now +several implementations of a single source symbol, quite possibly none of them +having the actual source symbol name). + +This allows any function cloning to be disabled, and makes any such +optimization ineffective, and our source safe for debuggers everywhere. + +See http://wiki.illumos.org/display/illumos/GCC+Modifications +--- + gcc/common.opt | 5 +++++ + gcc/doc/invoke.texi | 11 ++++++++++- + gcc/tree-inline.c | 3 ++- + 3 files changed, 17 insertions(+), 2 deletions(-) + +Index: gcc-48/src/gcc/common.opt +=================================================================== +--- gcc-48.orig/src/gcc/common.opt 2013-03-14 13:13:36.000000000 +0400 ++++ gcc-48/src/gcc/common.opt 2013-11-07 13:09:27.760550425 +0400 +@@ -908,6 +908,11 @@ + Common Report Var(flag_check_data_deps) + Compare the results of several data dependence analyzers. + ++fclone-functions ++Common Report Var(flag_clone_functions) Init(1) ++Allow the compiler to clone functions to facilitate certain optimizations. ++Enabled by default. ++ + fcombine-stack-adjustments + Common Report Var(flag_combine_stack_adjustments) Optimization + Looks for opportunities to reduce stack adjustments and stack references. +Index: gcc-48/src/gcc/doc/invoke.texi +=================================================================== +--- gcc-48.orig/src/gcc/doc/invoke.texi 2013-06-19 23:55:50.000000000 +0400 ++++ gcc-48/src/gcc/doc/invoke.texi 2013-11-07 13:10:28.439356714 +0400 +@@ -357,7 +357,7 @@ + -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol + -fbtr-bb-exclusive -fcaller-saves @gol + -fcheck-data-deps -fcombine-stack-adjustments -fconserve-stack @gol +--fcompare-elim -fcprop-registers -fcrossjumping @gol ++-fcompare-elim -fclone-functions -fcprop-registers -fcrossjumping @gol + -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol + -fcx-limited-range @gol + -fdata-sections -fdce -fdelayed-branch @gol +@@ -8418,6 +8418,15 @@ + change in future releases when linker plugin enabled environments become more + common. + ++@item -fno-clone-functions ++@opindex fno-clone-functions ++Forbid the implicit cloning of functions implicit in certain ++optimizations. This also effectively will disable any optimization ++which wishes to clone functions, equivalent to each function having ++the ``noclone'' attribute. This allows the prevention of the ++dissociation of a piece of text from an intelligible and expected ++symbol name, which may hamper debugging and tracing. ++ + @item -fcompare-elim + @opindex fcompare-elim + After register allocation and post-register allocation instruction splitting, +Index: gcc-48/src/gcc/tree-inline.c +=================================================================== +--- gcc-48.orig/src/gcc/tree-inline.c 2013-03-08 15:29:06.000000000 +0400 ++++ gcc-48/src/gcc/tree-inline.c 2013-11-07 13:09:27.798801595 +0400 +@@ -4977,7 +4977,8 @@ + tree_versionable_function_p (tree fndecl) + { + return (!lookup_attribute ("noclone", DECL_ATTRIBUTES (fndecl)) +- && copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL); ++ && (copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL) ++ && flag_clone_functions); + } + + /* Delete all unreachable basic blocks and update callgraph. diff --git a/debian/patches/illumos-multiarch.diff b/debian/patches/illumos-multiarch.diff new file mode 100644 index 0000000..00fa9fc --- /dev/null +++ b/debian/patches/illumos-multiarch.diff @@ -0,0 +1,15 @@ +Index: gcc-47/src/gcc/config/i386/t-sol2-64 +=================================================================== +--- gcc-47.orig/src/gcc/config/i386/t-sol2-64 2012-06-10 18:07:40.302980669 +0000 ++++ gcc-47/src/gcc/config/i386/t-sol2-64 2012-06-10 18:12:10.873078450 +0000 +@@ -16,6 +16,7 @@ + # along with GCC; see the file COPYING3. If not see + # <http://www.gnu.org/licenses/>. + +-MULTILIB_OPTIONS = m32/m64 +-MULTILIB_DIRNAMES = 32 amd64 +-MULTILIB_OSDIRNAMES = . amd64 ++MULTILIB_OPTIONS = m64/m32 ++MULTILIB_DIRNAMES = 64 32 ++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-illumos) ++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-illumos) diff --git a/debian/patches/illumos-pragma-align.diff b/debian/patches/illumos-pragma-align.diff new file mode 100644 index 0000000..0c7873a --- /dev/null +++ b/debian/patches/illumos-pragma-align.diff @@ -0,0 +1,46 @@ +Description: Allow #pragma align to be used after a variable is declared + GCC mandates that #pragma align precede any declaration, Sun C does not. + See http://wiki.illumos.org/display/illumos/GCC+Modifications + +Index: gcc-48/src/gcc/config/sol2-c.c +=================================================================== +--- gcc-48.orig/src/gcc/config/sol2-c.c 2013-01-11 00:38:27.000000000 +0400 ++++ gcc-48/src/gcc/config/sol2-c.c 2013-11-07 13:15:05.497438976 +0400 +@@ -113,8 +113,9 @@ + { + tree decl = identifier_global_value (t); + if (decl && DECL_P (decl)) +- warning (0, "%<#pragma align%> must appear before the declaration of " +- "%D, ignoring", decl); ++ decl_attributes (&decl, build_tree_list (get_identifier ("aligned"), ++ build_tree_list (NULL, x)), ++ 0); + else + solaris_pending_aligns = tree_cons (t, build_tree_list (NULL, x), + solaris_pending_aligns); +Index: gcc-48/src/gcc/testsuite/gcc.dg/pragma-align-2.c +=================================================================== +--- gcc-48.orig/src/gcc/testsuite/gcc.dg/pragma-align-2.c 2011-11-08 01:02:57.000000000 +0400 ++++ gcc-48/src/gcc/testsuite/gcc.dg/pragma-align-2.c 2013-11-07 13:15:05.499487945 +0400 +@@ -26,9 +26,9 @@ + #pragma align bad_align /* { dg-warning "malformed" } */ + #pragma align 1(bad_align /* { dg-warning "malformed" } */ + +-int x, x1, x2, x4, x8, y8, z8, x16, x32, x64, x128, y128, z128; ++int x1, x2, x4, x8, y8, z8, x16, y16, x32, x64, x128, y128, z128 + +-#pragma align 16(x) /* { dg-warning "must appear before" } */ ++#pragma align 16(y16) + + int + main () +@@ -48,6 +48,9 @@ + if (__alignof__ (x16) < 16) + abort (); + ++ if (__alignof__ (y16) < 16) ++ abort (); ++ + if (__alignof__ (x32) < 32) + abort (); + diff --git a/debian/patches/illumos-rdynamic.diff b/debian/patches/illumos-rdynamic.diff new file mode 100644 index 0000000..2e3b83c --- /dev/null +++ b/debian/patches/illumos-rdynamic.diff @@ -0,0 +1,29 @@ +Index: gcc-48/src/gcc/configure.ac +=================================================================== +--- gcc-48.orig/src/gcc/configure.ac 2014-04-18 19:40:11.321832341 +0400 ++++ gcc-48/src/gcc/configure.ac 2014-04-18 19:51:39.967711188 +0400 +@@ -5230,15 +5230,21 @@ + : # No need to use a flag + AC_MSG_RESULT([yes]) + else +- AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([for -rdynamic]) + ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1 + if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then + plugin_rdynamic=yes + pluginlibs="-rdynamic" + else +- plugin_rdynamic=no +- enable_plugin=no ++ AC_MSG_CHECKING([for -Wl,-export-dynamic]) ++ ${CC} ${CFLAGS} ${LDFLAGS} -Wl,-export-dynamic conftest.c -o conftest > /dev/null 2>&1 ++ if $export_sym_check conftest | grep foobar > /dev/null; then ++ plugin_rdynamic=yes ++ pluginlibs="-Wl,-export-dynamic" ++ else ++ plugin_rdynamic=no ++ enable_plugin=no ++ fi + fi + AC_MSG_RESULT([$plugin_rdynamic]) + fi diff --git a/debian/patches/illumos-spec.diff b/debian/patches/illumos-spec.diff new file mode 100644 index 0000000..0a4c076 --- /dev/null +++ b/debian/patches/illumos-spec.diff @@ -0,0 +1,51 @@ +Index: gcc-48/src/gcc/config/sol2.h +=================================================================== +--- gcc-48.orig/src/gcc/config/sol2.h 2013-01-11 00:38:27.000000000 +0400 ++++ gcc-48/src/gcc/config/sol2.h 2013-11-07 13:13:00.257045588 +0400 +@@ -114,16 +114,16 @@ + #undef LIB_SPEC + #define LIB_SPEC \ + "%{!symbolic:\ +- %{pthreads|pthread:-lpthread} \ ++ %{pthreads|pthread:} \ + %{pthreads|pthread|fprofile-generate*:" LIB_TLS_SPEC "} \ +- %{p|pg:-ldl} -lc}" ++ %{p|pg:} -lc}" + + #ifndef CROSS_DIRECTORY_STRUCTURE + #undef MD_EXEC_PREFIX +-#define MD_EXEC_PREFIX "/usr/ccs/bin/" ++#define MD_EXEC_PREFIX "/usr/bin/" + + #undef MD_STARTFILE_PREFIX +-#define MD_STARTFILE_PREFIX "/usr/ccs/lib/" ++#define MD_STARTFILE_PREFIX "/usr/lib/" + #endif + + #undef STARTFILE_ARCH32_SPEC +@@ -153,9 +153,7 @@ + #define LINK_ARCH32_SPEC_BASE \ + "%{G:-G} \ + %{YP,*} \ +- %{R*} \ +- %{!YP,*:%{p|pg:-Y P,%R/usr/ccs/lib/libp:%R/usr/lib/libp:%R/usr/ccs/lib:%R/lib:%R/usr/lib} \ +- %{!p:%{!pg:-Y P,%R/usr/ccs/lib:%R/lib:%R/usr/lib}}}" ++ %{R*}" + + #undef LINK_ARCH32_SPEC + #define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE +Index: gcc-48/src/gcc/config/sol2-bi.h +=================================================================== +--- gcc-48.orig/src/gcc/config/sol2-bi.h 2013-01-11 00:38:27.000000000 +0400 ++++ gcc-48/src/gcc/config/sol2-bi.h 2013-11-07 13:13:00.258902250 +0400 +@@ -73,9 +73,7 @@ + #define LINK_ARCH64_SPEC_BASE \ + "%{G:-G} \ + %{YP,*} \ +- %{R*} \ +- %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \ +- %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}" ++ %{R*}" + + #undef LINK_ARCH64_SPEC + #ifndef USE_GLD diff --git a/debian/patches/illumos-strict-calling-conventions.diff b/debian/patches/illumos-strict-calling-conventions.diff new file mode 100644 index 0000000..342f91f --- /dev/null +++ b/debian/patches/illumos-strict-calling-conventions.diff @@ -0,0 +1,110 @@ +From: Richard Lowe <richlowe@richlowe.net> +Date: Sat, 27 Oct 2012 02:44:09 +0100 +Subject: [PATCH] Implement -fstrict-calling-conventions + +Stock GCC is overly willing to violate the ABI when calling local functions, +such that it passes arguments in registers on i386. This hampers debugging +with anything other than a fully-aware DWARF debugger, and is generally not +something we desire. + +Implement a flag which disables this behaviour, enabled by default. The flag is +global, though only effective on i386, to more easily allow its globalization +later which, given the odds, is likely to be necessary. + +See http://wiki.illumos.org/display/illumos/GCC+Modifications + +Index: gcc-48/src/gcc/common.opt +=================================================================== +--- gcc-48.orig/src/gcc/common.opt 2014-04-18 19:51:49.854293922 +0400 ++++ gcc-48/src/gcc/common.opt 2014-04-19 13:25:33.566648986 +0400 +@@ -1930,6 +1930,10 @@ + Common Report Var(flag_strict_aliasing) Optimization + Assume strict aliasing rules apply + ++fstrict-calling-conventions ++Common Report Var(flag_strict_calling_conventions) Init(1) ++Use strict ABI calling conventions even for static functions ++ + fstrict-overflow + Common Report Var(flag_strict_overflow) + Treat signed overflow as undefined +Index: gcc-48/src/gcc/config/i386/i386.c +=================================================================== +--- gcc-48.orig/src/gcc/config/i386/i386.c 2014-04-18 19:39:46.504594693 +0400 ++++ gcc-48/src/gcc/config/i386/i386.c 2014-04-19 13:28:34.056953493 +0400 +@@ -5176,6 +5176,7 @@ + /* Use register calling convention for local functions when possible. */ + if (decl + && TREE_CODE (decl) == FUNCTION_DECL ++ && (TARGET_64BIT || !flag_strict_calling_conventions) + /* Caller and callee must agree on the calling convention, so + checking here just optimize means that with + __attribute__((optimize (...))) caller could use regparm convention +@@ -5258,8 +5259,9 @@ + + /* For local functions, pass up to SSE_REGPARM_MAX SFmode + (and DFmode for SSE2) arguments in SSE registers. */ +- if (decl && TARGET_SSE_MATH && optimize +- && !(profile_flag && !flag_fentry)) ++ if (decl && TARGET_SSE_MATH && optimize && ++ (TARGET_64BIT || !flag_strict_calling_conventions) && ++ !(profile_flag && !flag_fentry)) + { + /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */ + struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl)); +Index: gcc-48/src/gcc/doc/invoke.texi +=================================================================== +--- gcc-48.orig/src/gcc/doc/invoke.texi 2014-04-18 19:51:49.889319972 +0400 ++++ gcc-48/src/gcc/doc/invoke.texi 2014-04-19 13:25:33.904408477 +0400 +@@ -8034,6 +8034,12 @@ + The @option{-fstrict-aliasing} option is enabled at levels + @option{-O2}, @option{-O3}, @option{-Os}. + ++@item -fstrict-calling-conventions ++@opindex fstrict-calling-conventions ++Use strict ABI calling conventions even with local functions. ++This disable certain optimizations that may cause GCC to call local ++functions in a manner other than that described by the ABI. ++ + @item -fstrict-overflow + @opindex fstrict-overflow + Allow the compiler to assume strict signed overflow rules, depending +Index: gcc-48/src/gcc/testsuite/gcc.target/i386/local.c +=================================================================== +--- gcc-48.orig/src/gcc/testsuite/gcc.target/i386/local.c 2012-02-27 23:18:23.000000000 +0400 ++++ gcc-48/src/gcc/testsuite/gcc.target/i386/local.c 2014-04-19 13:25:33.941693684 +0400 +@@ -1,5 +1,6 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -funit-at-a-time" } */ ++/* { dg-options "-O2 -funit-at-a-time -fno-strict-calling-conventions" { target ilp32 } } */ ++/* { dg-options "-O2 -funit-at-a-time" { target lp64 } } */ + /* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ia32 } } } */ + /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! { ia32 } } } } } */ + +Index: gcc-48/src/gcc/testsuite/gcc.target/i386/strict-cc.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-48/src/gcc/testsuite/gcc.target/i386/strict-cc.c 2014-04-19 13:25:33.944559397 +0400 +@@ -0,0 +1,22 @@ ++/* { dg-do compile { target { ilp32 } } } */ ++/* { dg-options "-O2 -funit-at-a-time -fstrict-calling-conventions" } */ ++/* { dg-final { scan-assembler "pushl.*\\\$1" } } */ ++/* { dg-final { scan-assembler "pushl.*\\\$2" } } */ ++/* { dg-final { scan-assembler "pushl.*\\\$3" } } */ ++/* { dg-final { scan-assembler "pushl.*\\\$4" } } */ ++/* { dg-final { scan-assembler "pushl.*\\\$5" } } */ ++ ++#include <stdio.h> ++ ++/* Verify that local calling convention is not used if strict conventions. */ ++static t(int, int, int, int, int) __attribute__ ((noinline)); ++ ++m() ++{ ++ t(1, 2, 3, 4, 5); ++} ++ ++static t(int a, int b, int c, int d, int e) ++{ ++ printf("%d\n", a, b, c, d, e); ++} diff --git a/debian/patches/illumos-use_libgcj_bc.diff b/debian/patches/illumos-use_libgcj_bc.diff new file mode 100644 index 0000000..38fe1c7 --- /dev/null +++ b/debian/patches/illumos-use_libgcj_bc.diff @@ -0,0 +1,13 @@ +Index: gcc-48/src/libjava/configure.host +=================================================================== +--- gcc-48.orig/src/libjava/configure.host 2012-03-14 20:33:37.000000000 +0400 ++++ gcc-48/src/libjava/configure.host 2013-11-07 13:12:28.303282197 +0400 +@@ -393,7 +393,7 @@ + esac + + case "${host}" in +- *linux*|*-kfreebsd*-gnu|*-gnu*) ++ *linux*|*-kfreebsd*-gnu|*-gnu*|*solaris*) + use_libgcj_bc=yes + ;; + *) diff --git a/debian/rules.conf b/debian/rules.conf index 95758fd..0121284 100644 --- a/debian/rules.conf +++ b/debian/rules.conf @@ -141,7 +141,7 @@ endef base_deb_cpus := amd64 i386 alpha base_deb_systems := $(foreach x,ada java java_plugin fortran libphobos libgc check locale,$(eval $(call gen_no_archs,$(x),$(base_deb_cpus),$(base_deb_systems)))) -linux_no_archs := !hurd-any !kfreebsd-any +linux_no_archs := !hurd-any !kfreebsd-any !illumos-any GCC_VERSION := $(strip $(shell cat $(firstword $(wildcard $(srcdir)/gcc/FULL-VER $(srcdir)/gcc/BASE-VER)))) NEXT_GCC_VERSION := $(shell echo $(GCC_VERSION) | \ @@ -263,6 +263,12 @@ else LIBC_DEP ?= libuclibc LIBC_DEV_DEP ?= libuclibc-dev endif + ifeq ($(DEB_TARGET_ARCH_OS),illumos) + LIBC_DEP = libc1 + libc_ver := 4.3+17 + libc_dev_ver := 4.3+17 + libc_dev := 4.3+17 + endif endif LIBC_DEV_DEP = $(LIBC_DEP)-dev # for cross @@ -270,7 +276,7 @@ ifeq ($(DEB_CROSS),yes) LIBC_DEP ?= $(LIBC_DEP)$(LS)$(AQ) LIBC_DEV_DEP ?= $(LIBC_DEV_DEP)$(LS)$(AQ) else - LIBC_DBG_DEP = libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, + LIBC_DBG_DEP = libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg [!illumos-any], endif # this is about Debian archs name, *NOT* GNU target triplet @@ -281,6 +287,7 @@ biarch_deb_map := \ sparc=sparc64 sparc64=sparc\ s390=s390x s390x=s390 \ kfreebsd-amd64=i386 \ + illumos-amd64=illumos-i386 \ armel=armhf \ armhf=armel biarch_deb_arch := $(patsubst $(DEB_TARGET_ARCH)=%,%, \ @@ -335,10 +342,12 @@ LIBC_DEV_DEP := $(LIBC_DEV_DEP)$(LS)$(AQ) (>= $(libc_dev_ver)) # TODO: make this automatic, there must be a better way to define LIBC_DEP. ifneq ($(DEB_CROSS),yes) LIBC_BUILD_DEP = libc6.1-dev (>= $(libc_dev_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_dev_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_dev_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_dev_ver)) + LIBC_BUILD_DEP += | libc1-dev (>= $(libc_dev_ver)) [illumos-amd64] ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric)) LIBC_BUILD_DEP += , libc6-dev (>= 2.13-31) [armel armhf] endif LIBC_BIARCH_BUILD_DEP = libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-sparc [sparc64], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 mipsn32 mipsn32el mips64 mips64el s390x sparc64 x32], libn32gcc1 [mips mipsel mips64 mips64el], lib64gcc1 [i386 mips mipsel mipsn32 mipsn32el powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel mipsn32 mipsn32el], libc6-dev-mipsn32 [mips mipsel mips64 mips64el], libc6-dev-mips32 [mipsn32 mipsn32el mips64 mips64el], + LIBC_BIARCH_BUILD_DEP += libc1-dev-illumos-i386 (>= $(libc_dev_ver)) [illumos-amd64], ifneq (,$(findstring amd64,$(biarchx32archs))) LIBC_BIARCH_BUILD_DEP += libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386], endif diff --git a/debian/rules.defs b/debian/rules.defs index d1aa87b..cb2ce42 100644 --- a/debian/rules.defs +++ b/debian/rules.defs @@ -897,6 +897,10 @@ ifeq ($(with_base_only),yes) with_d := no endif +ifeq ($(DEB_HOST_ARCH),illumos-amd64) + with_d := no +endif + ifeq ($(with_d)-$(with_separate_gdc),yes-yes) ifneq (,$(findstring gdc,$(PKGSOURCE))) languages := c c++ @@ -1198,6 +1202,9 @@ GFDL_INVARIANT_FREE := yes ifeq ($(derivative),Ubuntu) GFDL_INVARIANT_FREE := no endif +ifeq ($(DEB_TARGET_ARCH_OS),illumos) + GFDL_INVARIANT_FREE := no +endif # ------------------------------------------------------------------- # non-extra config @@ -1580,7 +1587,7 @@ define gen_biarch export TARGET64_MACHINE endif endef -biarch32archs := /amd64/ppc64/kfreebsd-amd64/s390x/sparc64/x32/mipsn32/mipsn32el/mips64/mips64el/ +biarch32archs := /amd64/ppc64/kfreebsd-amd64/s390x/sparc64/x32/mipsn32/mipsn32el/mips64/mips64el/illumos-amd64/ biarch64archs := /i386/powerpc/sparc/s390/mips/mipsel/mipsn32/mipsn32el/x32/ biarchn32archs := /mips/mipsel/mips64/mips64el/ ifeq ($(derivative),Ubuntu) diff --git a/debian/rules.patch b/debian/rules.patch index 6235147..4253442 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -332,6 +332,17 @@ debian_patches += ada-ppc64 debian_patches += ada-mips64 debian_patches += ada-bootstrap-compare +ifeq ($(DEB_TARGET_ARCH_OS), illumos) + debian_patches += illumos-multiarch + debian_patches += illumos-rdynamic + debian_patches += illumos-spec + debian_patches += illumos-use_libgcj_bc + debian_patches += illumos-pragma-align + debian_patches += illumos-fclone-functions + debian_patches += illumos-strict-calling-conventions + debian_patches += illumos-boehm-gc +endif + # don't remove, this is regularly overwritten, see PR sanitizer/63958. #debian_patches += libasan-sparc diff --git a/debian/rules2 b/debian/rules2 index 7481d73..007948e 100644 --- a/debian/rules2 +++ b/debian/rules2 @@ -225,6 +225,15 @@ else --enable-shared \ --enable-linker-build-id \ + ifeq (illumos,$(DEB_TARGET_ARCH_OS)) + CONFARGS += \ + --enable-tls \ + --enable-threads=posix \ + --enable-libmudflap \ + --with-gnu-as \ + --with-gnu-ld + endif + ifneq ($(single_package),yes) CONFARGS += \ --libexecdir=/$(libexecdir) \ @@ -539,7 +548,7 @@ ifeq ($(DEB_TARGET_ARCH_OS),linux) endif endif -ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64)) +ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64 illumos-amd64)) ifneq (,$(filter $(derivative),Ubuntu)) ifneq (,$(filter $(distrelease),dapper hardy)) CONFARGS += --with-arch-32=i486 |