You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.0 KiB
90 lines
3.0 KiB
# --- T2-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# T2 SDE: package/.../dietlibc/sane-defaults.patch |
|
# Copyright (C) 2004 - 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 --- |
|
|
|
For certain architectures we need to mangle the opts to get working binaries. |
|
This is for example the case on mips, where we need -mnoabi-calls if we |
|
do not want get segfaults ... Alternatively instead of injecting the generic |
|
-Os battery of options we could define fine-grained injections in our build |
|
system but I find working with up-stream people and those defaults might be |
|
the better choice. |
|
|
|
- Rene Rebe <rene@exactcode.de> |
|
|
|
--- dietlibc-0.29/diet.c 2005-05-18 14:38:55.000000000 +0000 |
|
+++ dietlibc-0.29-improved/diet.c 2005-11-27 15:11:24.000000000 +0000 |
|
@@ -33,8 +33,8 @@ |
|
"sparc64","-Os","-m64","-mhard-quad-float",0, |
|
"alpha","-Os","-fomit-frame-pointer",0, |
|
"arm","-Os","-fomit-frame-pointer",0, |
|
- "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, |
|
- "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, |
|
+ "mips","-Os","-fomit-frame-pointer","-G","0",0, |
|
+ "mipsel","-Os","-fomit-frame-pointer","-G","0",0, |
|
"ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, |
|
"ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, |
|
"s390","-Os","-fomit-frame-pointer",0, |
|
@@ -44,6 +44,13 @@ |
|
"x86_64","-Os","-fstrict-aliasing","-momit-leaf-frame-pointer","-mfancy-math-387",0, |
|
0}; |
|
|
|
+static const char* Opts[] = { |
|
+ "mips", "-mno-abicalls","-fno-pic",0, |
|
+ "mipsel", "-mno-abicalls","-fno-pic",0, |
|
+ "sparc64", "-m64","-mhard-quad-float",0, |
|
+ 0 |
|
+}; |
|
+ |
|
static void usage(void) { |
|
__write2( |
|
#ifdef __DYN_LIB |
|
@@ -77,6 +83,7 @@ |
|
#endif |
|
const char *nostdlib="-nostdlib"; |
|
const char *libgcc="-lgcc"; |
|
+ const char **o; |
|
char dashL[1000]; |
|
char dashstatic[]="-static"; |
|
int i; |
|
@@ -333,8 +340,21 @@ |
|
} |
|
#endif |
|
*dest++="-D__dietlibc__"; |
|
+ /* strictly needed opts */ |
|
+ for (o=Opts;*o;++o) { |
|
+ if (!strcmp(*o,shortplatform)) { |
|
+ ++o; |
|
+ while (*o) { |
|
+ *dest++=(char*)*o; |
|
+ ++o; |
|
+ } |
|
+ break; |
|
+ } else |
|
+ while (*o) ++o; |
|
+ } |
|
+ |
|
if (mangleopts) { |
|
- const char **o=Os; |
|
+ o=Os; |
|
|
|
{ |
|
int fd; |
|
--- dietlibc-0.30/sparc64/Makefile.add 2004-03-25 21:11:00.000000000 +0000 |
|
+++ dietlibc-0.30-patch/sparc64/Makefile.add 2006-07-31 10:12:05.000000000 +0000 |
|
@@ -1,3 +1,3 @@ |
|
-CFLAGS+=-m64 -Os |
|
+CFLAGS+=-m64 -Os -mhard-quad-float |
|
VPATH:=sparc64:syscalls.s:$(VPATH) |
|
LIBOBJ+=$(patsubst %,$(OBJDIR)/%,__time.o)
|
|
|