Dash:
[t2.git] / package / base / dietlibc / diethome.patch
blobcd256eefe93d23367f1dad67777018934aa44537
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../dietlibc/diethome.patch
5 # Copyright (C) 2006 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 The embedded Linker script must not carry the sysroot prefix.
19 - Rene Rebe <rene@exactcode.de>
21 --- ./diet.c.orig 2006-11-05 22:08:24.000000000 +0100
22 +++ ./diet.c 2006-11-05 22:18:03.000000000 +0100
23 @@ -396,9 +396,12 @@
24 if (shared){ *dest++=c; }
25 f=alloca(strlen(platform)+100);
26 if (_link) {
27 + int skip = 0;
28 + if (getenv("DIETHOME"))
29 + skip = strlen(getenv("DIETHOME")) - strlen(DIETHOME);
30 strcpy(f,"-Wl,-dynamic-linker=");
31 - strcat(f,platform);
32 -// strcat(f,"/diet-linux.so");
33 + fprintf(stderr, "env: %s build: %s skip: %d\n", getenv("DIETHOME"), DIETHOME, skip);
34 + strcat(f,platform+skip);
35 strcat(f,"/libdl.so");
36 *dest++=f;