Commit Graph

215 Commits

Author SHA1 Message Date
Rich Felker 67122dc449 update gcc fdpic patch to fix re-emergence of pr66609
some of the forward-ported fdpic patch code contained duplicates of
code that was changed in the fix for pr66609. failure to notice this
before allowed the bug to re-emerge and broke musl's use of
overridable weak aliases.
2015-09-22 04:18:12 +00:00
Rich Felker d0ca7b1054 update gcc fdpic patch
two changes are made:

1. always enable flag_pic for fdpic. without this, various ICE and bad
codegen was observed.

2. allow sibcall for fdpic; it's valid since r12 is call-clobbered.
2015-09-21 06:00:40 +00:00
Rich Felker 72b4cdc7e2 fix inverted setting of sh fdpic flag by binutils
the behavior by bfd/ld matched the ABI document but was the opposite
of the kernel's interpretation and opposite of how ld treats the flag
on every other target using fdpic.

see this thread for details:
https://sourceware.org/ml/binutils/2015-09/msg00186.html
2015-09-14 17:31:27 +00:00
Rich Felker 8d226d0ff6 bypass gcc's potentially-broken detection of tls support 2015-09-13 08:29:07 +00:00
Rich Felker 5eb6f9add0 fix gcc's misdetection of sh as not supporting tls 2015-09-13 08:27:27 +00:00
Rich Felker 73e57bee7d improve sample config.mak 2015-09-13 04:17:08 +00:00
Rich Felker 954245dc83 fix error in fdpic patch that enabled fdpic by default 2015-09-13 03:53:43 +00:00
Rich Felker 3a0c9775b6 add initial fdpic support
binutils-2.25.1/0003-shemuls.diff is needed to include the existing
fdpic support in the build when targeting sh*-linux-* rather than
tucking it away under sh*-uclinux-* only

gcc-5.2.0/0007-fdpic.diff is based on the original abandoned fdpic
patch 3/3 sent to the gcc list in 2010, updated for modern gcc and
with the uclinux dependencies removed. the original is here:

  https://gcc.gnu.org/ml/gcc-patches/2010-08/msg01464.html

gcc-5.2.0/0001-musl.diff has been updated to use the right musl
dynamic linker pathname for fdpic so that musl-specific changes can be
avoided in the main fdpic patch.

at present, additional patches to musl are needed to produce working
binaries for the target.
2015-09-11 17:27:35 +00:00
Rich Felker 532e13f3f7 avoid installing stage0 gcc
previously the stage0 gcc was installed to the output location during
the build, then replaced later by the final gcc. this violates the
principles of make and simply wastes time. the stage0 gcc is usable
in-place without installing it, so we can simply do that instead.
2015-08-27 06:42:32 +00:00
Rich Felker fa4bf7924b allow building with a particular tag/branch/commit of musl 2015-08-25 22:57:20 +00:00
Rich Felker 5e416e32e6 add clean rules to makefile 2015-08-25 21:28:55 +00:00
Rich Felker 2a124546d1 tweaks to fix regressions related to gcc wanting libc headers 2015-08-25 20:25:43 +00:00
Rich Felker 7d58f6a9bf add README 2015-08-25 19:58:17 +00:00
Rich Felker 0b78030478 add dummy files for empty dirs to include them in git 2015-08-25 19:34:59 +00:00
Rich Felker 596e008012 initial check-in 2015-08-25 19:32:46 +00:00