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.

83 lines
2.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/pkg_patch/gcc/800-arm-bigendian.patch
  5. # Copyright (C) 2009 The OpenSDE 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. # --- SDE-COPYRIGHT-NOTE-END ---
  16. By Lennert Buytenhek <buytenh@wantstofly.org>
  17. Adds support for arm*b-linux* big-endian ARM targets
  18. See http://gcc.gnu.org/PR16350
  19. --- gcc-4.2.0/gcc/config/arm/linux-elf.h
  20. +++ gcc-4.2.0/gcc/config/arm/linux-elf.h
  21. @@ -28,19 +28,33 @@
  22. #undef TARGET_VERSION
  23. #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
  24. +/*
  25. + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  26. + * (big endian) configurations.
  27. + */
  28. +#if TARGET_BIG_ENDIAN_DEFAULT
  29. +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
  30. +#define TARGET_ENDIAN_OPTION "mbig-endian"
  31. +#define TARGET_LINKER_EMULATION "armelfb_linux"
  32. +#else
  33. +#define TARGET_ENDIAN_DEFAULT 0
  34. +#define TARGET_ENDIAN_OPTION "mlittle-endian"
  35. +#define TARGET_LINKER_EMULATION "armelf_linux"
  36. +#endif
  37. +
  38. #undef TARGET_DEFAULT_FLOAT_ABI
  39. #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  40. #undef TARGET_DEFAULT
  41. -#define TARGET_DEFAULT (0)
  42. +#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  43. #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  44. -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  45. +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  46. #undef MULTILIB_DEFAULTS
  47. #define MULTILIB_DEFAULTS \
  48. - { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  49. + { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  50. /* Now we define the strings used to build the spec file. */
  51. #undef LIB_SPEC
  52. @@ -61,7 +75,7 @@
  53. %{rdynamic:-export-dynamic} \
  54. %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
  55. -X \
  56. - %{mbig-endian:-EB}" \
  57. + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  58. SUBTARGET_EXTRA_LINK_SPEC
  59. #undef LINK_SPEC
  60. --- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
  61. +++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
  62. @@ -696,6 +696,11 @@
  63. tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
  64. tmake_file="${tmake_file} t-linux arm/t-arm"
  65. case ${target} in
  66. + arm*b-*)
  67. + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
  68. + ;;
  69. + esac
  70. + case ${target} in
  71. arm*-*-linux-*eabi)
  72. tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
  73. tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"