# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../dietlibc/diethome.patch # Copyright (C) 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- The embedded Linker script must not carry the sysroot prefix. - Rene Rebe --- ./diet.c.orig 2006-11-05 22:08:24.000000000 +0100 +++ ./diet.c 2006-11-05 22:18:03.000000000 +0100 @@ -396,9 +396,12 @@ if (shared){ *dest++=c; } f=alloca(strlen(platform)+100); if (_link) { + int skip = 0; + if (getenv("DIETHOME")) + skip = strlen(getenv("DIETHOME")) - strlen(DIETHOME); strcpy(f,"-Wl,-dynamic-linker="); - strcat(f,platform); -// strcat(f,"/diet-linux.so"); + fprintf(stderr, "env: %s build: %s skip: %d\n", getenv("DIETHOME"), DIETHOME, skip); + strcat(f,platform+skip); strcat(f,"/libdl.so"); *dest++=f; }