[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] use -headerpad_max_install_names on Mac OS
From: |
Jim Ursetto |
Subject: |
Re: [Chicken-hackers] [PATCH] use -headerpad_max_install_names on Mac OS X when linking shared libs |
Date: |
Thu, 29 Aug 2013 17:35:17 -0500 |
I normally do this in CSC_OPTIONS because it's in the makefile for the compiler
but it isn't transmitted to chicken-install.
I think it is ok to hardcode it in csc.scm (I use -headerpad 128). Only thing
I'm not sure about offhand is whether the max_install_names variant is
available on all OS X versions. I seem to recall it is fairly recent.
On Aug 29, 2013, at 5:45, Felix Winkelmann <address@hidden> wrote:
> 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 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 mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers