[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] use -headerpad_max_install_names on Mac OS X w
From: |
Felix Winkelmann |
Subject: |
[Chicken-hackers] [PATCH] use -headerpad_max_install_names on Mac OS X when linking shared libs |
Date: |
Thu, 29 Aug 2013 12:45:55 +0200 (CEST) |
Since we use install_name_tool(1) to modify the runpath of shared libraries
compiled
with csc (all *.so's), this may fail, if the space inside the binary is
insufficient
to hold the new updated paths. The patch adds "-headerpad_max_install_names" to
the
linker command (both for gcc(1) and by using "-Wl,..." for the linker, I found
this
on the 'net, so I'm not sure if this is really required).
felix
>From 2f8748e0989279d2521d3f6e14981c1403322068 Mon Sep 17 00:00:00 2001
From: felix <address@hidden>
Date: Tue, 27 Aug 2013 16:15:12 +0200
Subject: [PATCH] on darwin, pass -headerpad_max_install_names or
install_name_tool may fail, depending on path length. and
all that just to save a few kb, thank you, Apple!
---
csc.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/csc.scm b/csc.scm
index a54c14c..ce35559 100644
--- a/csc.scm
+++ b/csc.scm
@@ -519,7 +519,7 @@ EOF
(set! compile-options (append pic-options '("-DC_SHARED") compile-options))
(set! link-options
(cons (cond
- (osx (if lib "-dynamiclib" "-bundle"))
+ (osx (if lib "-dynamiclib" "-bundle
-Wl,-headerpad_max_install_names -headerpad_max_install_names"))
(else "-shared")) link-options))
(set! shared #t) )
--
1.7.9.5
- [Chicken-hackers] [PATCH] use -headerpad_max_install_names on Mac OS X when linking shared libs,
Felix Winkelmann <=