summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-07-01 15:29:34 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-07-01 15:29:34 +0000
commit35e7dc9a4be4e36fa5e21c1d3e38830ec9e29b8f (patch)
tree72ea67d1db8d5bca247046eeaa75a1de1d342ae0
parent4974bc0b5ae38df989ed0d708299cca9f32046da (diff)
downloaddh-illumos-35e7dc9a4be4e36fa5e21c1d3e38830ec9e29b8f.tar.gz
Added linker wrapper to use with LD_ALTEXEC
-rw-r--r--debian/control5
-rw-r--r--debian/install1
-rwxr-xr-xld-gnu-to-sun27
3 files changed, 32 insertions, 1 deletions
diff --git a/debian/control b/debian/control
index 16f8901..dff9a4a 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,8 @@ Package: dh-illumos
Architecture: all
Multi-Arch: foreign
Depends: ${perl:Depends}, ${misc:Depends}, debhelper (>=8),
- ksh93, sunmake, illumos-source, illumos-binutils
+ ksh93, sunmake, illumos-source, illumos-binutils, binutils, gcc (>=4.7),
+ libc-dev-bin, flex, bison
Enhances: debhelper
Description: debhelper addons to work with illumos sources
This package provides debhelper addons configuring and building
@@ -17,3 +18,5 @@ Description: debhelper addons to work with illumos sources
.
dh_illumos_gate - unpacks illumos sources, apply specific fixes and patches.
dh_illumos_make - build illumos components.
+ .
+ This package also depends on packages required to build illumos sources.
diff --git a/debian/install b/debian/install
index 0ca375e..6786a23 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
dh_illumos_gate usr/bin
dh_illumos_make usr/bin
+ld-gnu-to-sun usr/bin
diff --git a/ld-gnu-to-sun b/ld-gnu-to-sun
new file mode 100755
index 0000000..0a5e083
--- /dev/null
+++ b/ld-gnu-to-sun
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+set -u
+
+cmd=/usr/bin/sunld
+
+while [ $# -ne 0 ]; do
+ case "$1" in
+ # GCC with GNU ld passes -m <emulation>,
+ # Sun ld does not need it, and -m options has different meaning:
+ -m) shift || true;;
+
+ # Ignore long options, Sun ld does not support long options at all:
+ --*) ;;
+
+ *) cmd="$cmd $1" ;;
+ esac
+ shift || true
+done
+
+# Trace:
+set -x
+exec $cmd
+
+exit 0
+