Re: [PATCH] use -rpath option

2020-03-24 Thread John Cowan
Again, amazing.  Does this mean that Chicken *output* can also be built
with tcc?  Now that the compiler is modularized, that would give Chicken a
dynamic compiler.

On Tue, Mar 24, 2020 at 9:03 AM  wrote:

> felix.winkelm...@bevuta.com wrote:
> > This patch replaces the use of the "-R" linker option by "-rpath", which
> appears to be
> > more portable (accepted by tcc, for example). According to the GNU ld
> manual, -R is
> > actually a compatibility alias for -rpath, so the latter seems to be
> more canonical.
> > The manual page for Solaris' ld lists only -R, so on that platform we
> still use it.
>
> Pushed, thank you!
>
> I also took the liberty to push the remaining change needed to make
> CHICKEN build with TCC.
>


Re: [PATCH] use -rpath option

2020-03-24 Thread kooda
felix.winkelm...@bevuta.com wrote:
> This patch replaces the use of the "-R" linker option by "-rpath", which 
> appears to be
> more portable (accepted by tcc, for example). According to the GNU ld manual, 
> -R is
> actually a compatibility alias for -rpath, so the latter seems to be more 
> canonical.
> The manual page for Solaris' ld lists only -R, so on that platform we still 
> use it.

Pushed, thank you!

I also took the liberty to push the remaining change needed to make
CHICKEN build with TCC.


[PATCH] use -rpath option

2020-03-12 Thread felix . winkelmann
This patch replaces the use of the "-R" linker option by "-rpath", which 
appears to be
more portable (accepted by tcc, for example). According to the GNU ld manual, 
-R is
actually a compatibility alias for -rpath, so the latter seems to be more 
canonical.
The manual page for Solaris' ld lists only -R, so on that platform we still use 
it.


felix
From 0e9dba82304d5631a52fe84be80f2b308b03e7cc Mon Sep 17 00:00:00 2001
From: felix 
Date: Wed, 11 Mar 2020 18:41:50 +0100
Subject: [PATCH] use -rpath instead of -R on all platforms but Solaris

---
 Makefile.aix | 2 +-
 Makefile.android | 4 ++--
 Makefile.bsd | 4 ++--
 Makefile.haiku   | 4 ++--
 Makefile.hurd| 4 ++--
 Makefile.linux   | 4 ++--
 README   | 2 +-
 csc.scm  | 9 ++---
 manual/Cross development | 2 +-
 9 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/Makefile.aix b/Makefile.aix
index ce4cf4fb..93322b06 100644
--- a/Makefile.aix
+++ b/Makefile.aix
@@ -49,7 +49,7 @@ CXX_COMPILER = g++
 
 LINKER_OPTIONS = -maix64 -Wl,-bsvr4 -Wl,-bbigtoc
 LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared
-LINKER_EXECUTABLE_OPTIONS = -L. -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_EXECUTABLE_OPTIONS = -L. -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 
 LIBRARIAN_OPTIONS = -rv -X 64
diff --git a/Makefile.android b/Makefile.android
index 1812dcc1..7d30e01f 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -42,8 +42,8 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
-LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-R"$(RUNTIME_LINKER_PATH)"
-LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-rpath="$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 # Android NDK build system currently does not understand
 # versioned sonames, so don't try to embed a soname.
 #LIBCHICKEN_SO_LINKER_OPTIONS = 
-Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so.$(BINARYVERSION)
diff --git a/Makefile.bsd b/Makefile.bsd
index b982a06f..b1996e0b 100644
--- a/Makefile.bsd
+++ b/Makefile.bsd
@@ -43,8 +43,8 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
-LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R"$(RUNTIME_LINKER_PATH)" 
-Wl,-L.
-LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared 
-Wl,-rpath="$(RUNTIME_LINKER_PATH)" -Wl,-L.
+LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS = 
-Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so.$(BINARYVERSION)
 LIBRARIES = -lm -lpthread
 NEEDS_RELINKING = yes
diff --git a/Makefile.haiku b/Makefile.haiku
index a20da9b2..27763fa0 100644
--- a/Makefile.haiku
+++ b/Makefile.haiku
@@ -42,8 +42,8 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
-LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-R"$(RUNTIME_LINKER_PATH)"
-LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-rpath="$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS = 
-Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so.$(BINARYVERSION)
 LIBRARIES = -lnetwork
 NEEDS_RELINKING = yes
diff --git a/Makefile.hurd b/Makefile.hurd
index f09d6ded..abac66a2 100644
--- a/Makefile.hurd
+++ b/Makefile.hurd
@@ -43,8 +43,8 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
-LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-R"$(RUNTIME_LINKER_PATH)"
-LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-rpath="$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS = 
-Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so.$(BINARYVERSION)
 LIBRARIES = -lm -ldl
 NEEDS_RELINKING = yes
diff --git a/Makefile.linux b/Makefile.linux
index cfa8c2c5..7f0fa06c 100644
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -43,8 +43,8 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
 endif
 endif
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
-LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-R"$(RUNTIME_LINKER_PATH)"
-LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared 
-Wl,-rpath="$(RUNTIME_LINKER_PATH)"
+LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-rpath="$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS =