OpenSDE Packages Database (without history before r20070)
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

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../dietlibc/sane-defaults.patch
  5. # Copyright (C) 2004 - 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 ---
  16. For certain architectures we need to mangle the opts to get working binaries.
  17. This is for example the case on mips, where we need -mnoabi-calls if we
  18. do not want get segfaults ... Alternatively instead of injecting the generic
  19. -Os battery of options we could define fine-grained injections in our build
  20. system but I find working with up-stream people and those defaults might be
  21. the better choice.
  22. - Rene Rebe <rene@exactcode.de>
  23. --- dietlibc-0.29/diet.c 2005-05-18 14:38:55.000000000 +0000
  24. +++ dietlibc-0.29-improved/diet.c 2005-11-27 15:11:24.000000000 +0000
  25. @@ -33,8 +33,8 @@
  26. "sparc64","-Os","-m64","-mhard-quad-float",0,
  27. "alpha","-Os","-fomit-frame-pointer",0,
  28. "arm","-Os","-fomit-frame-pointer",0,
  29. - "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
  30. - "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
  31. + "mips","-Os","-fomit-frame-pointer","-G","0",0,
  32. + "mipsel","-Os","-fomit-frame-pointer","-G","0",0,
  33. "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
  34. "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
  35. "s390","-Os","-fomit-frame-pointer",0,
  36. @@ -44,6 +44,13 @@
  37. "x86_64","-Os","-fstrict-aliasing","-momit-leaf-frame-pointer","-mfancy-math-387",0,
  38. 0};
  39. +static const char* Opts[] = {
  40. + "mips", "-mno-abicalls","-fno-pic",0,
  41. + "mipsel", "-mno-abicalls","-fno-pic",0,
  42. + "sparc64", "-m64","-mhard-quad-float",0,
  43. + 0
  44. +};
  45. +
  46. static void usage(void) {
  47. __write2(
  48. #ifdef __DYN_LIB
  49. @@ -77,6 +83,7 @@
  50. #endif
  51. const char *nostdlib="-nostdlib";
  52. const char *libgcc="-lgcc";
  53. + const char **o;
  54. char dashL[1000];
  55. char dashstatic[]="-static";
  56. int i;
  57. @@ -333,8 +340,21 @@
  58. }
  59. #endif
  60. *dest++="-D__dietlibc__";
  61. + /* strictly needed opts */
  62. + for (o=Opts;*o;++o) {
  63. + if (!strcmp(*o,shortplatform)) {
  64. + ++o;
  65. + while (*o) {
  66. + *dest++=(char*)*o;
  67. + ++o;
  68. + }
  69. + break;
  70. + } else
  71. + while (*o) ++o;
  72. + }
  73. +
  74. if (mangleopts) {
  75. - const char **o=Os;
  76. + o=Os;
  77. {
  78. int fd;
  79. --- dietlibc-0.30/sparc64/Makefile.add 2004-03-25 21:11:00.000000000 +0000
  80. +++ dietlibc-0.30-patch/sparc64/Makefile.add 2006-07-31 10:12:05.000000000 +0000
  81. @@ -1,3 +1,3 @@
  82. -CFLAGS+=-m64 -Os
  83. +CFLAGS+=-m64 -Os -mhard-quad-float
  84. VPATH:=sparc64:syscalls.s:$(VPATH)
  85. LIBOBJ+=$(patsubst %,$(OBJDIR)/%,__time.o)