Commit Graph

90 Commits

Author SHA1 Message Date
Patrick Oppenlander 9c4ba81399 add support for gcc 7.2.0 2017-10-19 19:48:01 -04:00
Rich Felker 48d9c59d22 fix compiling gcc 6.3.0 with strict c++ compilers
this patch is a backport of gcc revision 239971 to gcc 6.3.0.

submitted by osvein as PR#35.
2017-10-19 19:30:05 -04:00
Rich Felker 458feff9b0 add patch fixing static linking bug with gotoff relocs on microblaze 2017-01-02 15:52:21 -05:00
Rich Felker 7db01153a2 add patch fixing broken microblaze gcc on 32-bit hosts
bogus use PRIx64 with unsigned long (assumption of 64-bit host) in
gcc. older gcc versions are also affected, I think, but not yet fixed.
2017-01-02 15:15:42 -05:00
Szabolcs Nagy f8b26b0ae8 add gcc-6.3.0 patches 2017-01-02 13:16:04 +00:00
Rich Felker f00b09f654 add patch for s390x musl ldso name to gcc 6.2.0 patchset 2016-11-11 23:42:54 -05:00
Rich Felker a4c1265daa remove broken gcc 6.2.0 powerpc patch
this patch breaks powerpc64 builds and is not necessary to produce a
working 32-bit powerpc toolchain. it seems like it may be useful for
reducing libgcc-internal bloat, but it can be reintroduced later after
it's fixed, if desired.
2016-11-08 17:50:40 -05:00
Rich Felker 005f8e4a3f add binutils 2.27 patch fixing pr17739 on sh
upstream fix was slightly too late to make it into the release. patch
was not included in mcm for previous binutils versions because it
depends on new upstream infrastructure. now gc-sections should be safe
to use on sh.
2016-11-07 16:17:35 -05:00
Szabolcs Nagy d08c2e8e02 fix gcc-5.* build with a recent gcc
https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00044.html
2016-11-07 12:50:37 -05:00
Szabolcs Nagy c54b2f283d add gcc-6.2.0 patches 2016-11-06 22:34:44 -05:00
Rich Felker ceb91e7d4e add binutils-2.27 patches
only trivial updates needed to the J2 patch; others were merged
upstream already.
2016-11-06 22:34:19 -05:00
Filippo Valsorda 8467bf3a6f Patch elf.h circular dependency out of linux-4.4.10
This enables building on platforms without a native elf.h, like OS X

Fixes #8
2016-05-30 04:44:24 +02:00
Filippo Valsorda d6fe0339ee Fix ub in binutils causing failure to build for arm with clang
https://sourceware.org/bugzilla/show_bug.cgi?id=19222

Fixed by applying binutils@d840c08.
2016-05-30 04:44:24 +02:00
Patrick Oppenlander e84b1bd1fc add support for gcc 5.3.0 and use by default 2016-05-17 02:15:34 +00:00
Rich Felker 2f1e820bed fix failure of mips libgcc_eh patch to apply
commit 0a16a12799 introduced this patch
with missing leading path component.
2016-04-19 01:48:39 +00:00
Rich Felker 0a16a12799 add patch fixing mips libgcc_eh build not to depend on kernel headers 2016-04-11 02:42:07 +00:00
Rich Felker 43bdd7fc19 fix binutils patching regression that stopped the build
commit 23d6f66966 introduced this
regression as a failure to backport part of the gas testsuite diff
from binutils master to 2.25.1 where the file being patched had a
trivial difference. I'm not sure how this went unnoticed at the time
it was committed.
2016-03-02 00:47:54 +00:00
Rich Felker 23d6f66966 update j2 support patches to Yoshinori Sato's versions
with some minor fixes. unlike my minimal patches, Sato-san's properly
add the isa level logic to binutils and add cas.l atomic intrinsics to
gcc.
2016-02-12 05:57:31 +00:00
Rich Felker 69cadffdec add patch fixing sh sibcall bug that affected musl, remove workaround 2016-02-12 05:35:23 +00:00
Rich Felker cf013ce0c0 add patch to fix ld bug breaking musl on microblaze 2016-02-11 23:53:39 +00:00
Rich Felker f592ffb96b fix j2 cas.l instruction encoding in patch 2016-01-15 01:13:15 +00:00
Rich Felker 8878510198 fix bad codegen in sh/fdpic when stack protector is enabled 2015-11-16 02:12:46 +00:00
Rich Felker 35bbd0c571 align sh/fdpic patch with what went upstream to gcc 2015-11-16 02:09:36 +00:00
Rich Felker 3fb6709806 add support for last GPLv2 binutils version (git snapshot)
patch set consists of:

0001 static pie support (--no-dynamic-linker)
0006 avoid erroring out the build when docs can't be built
0007 add sh symbol@PCREL support to gas

example configuration is added to config.mak.dist too.
2015-11-06 06:44:16 +00:00
Rich Felker 06a1f34243 add support for gcc 4.2.1 (last gplv2 version)
patch set consists of:

0001 full musl libc target support
0002 fixes for wrong optimizations of weak defs/aliases
0003 various sh breakage in configure scripts
0005 static pie support
0006 --enable-default-pie support
0008 fix for cross compiling bug in build system
0009 fix for wrong default div strategy for sh2 (missing libgcc code)
0010 fix failure to build on modern host gcc due to gnu-inline
0011 fix sh & alpha bootstrap failures before libc is built
0012 fix broken local-exec TLS with -fPIE on sh
2015-11-06 06:23:54 +00:00
Rich Felker d48d611f99 fix docs error introduced in binutils static pie patch
this broke the build. apparently the original patch I sent upstream
had this error and it was fixed when committing without me noticing.
2015-11-06 00:40:50 +00:00
Rich Felker eeaae9e133 update gcc defaultpie patch to be switchable at configure time
the sample config.mak.dist is also updated to show usage.
2015-11-05 23:37:39 +00:00
Rich Felker 527fca9755 update binutils static pie patch to support all targets
the new patch is identical to the one committed upstream, except that
the binutils 2.25.1 used info->executable instead of
bfd_link_executable(info), and support for nds32 and score targets is
removed since 2.25.1 did not have the relevant code for them.
2015-11-05 23:33:19 +00:00
Rich Felker 8137f50ef9 add patch to fix binutils pr 19091 affecting sh/fdpic shared libs
this may not be the correct fix but works for now. patch will be
updated as needed. for details see:

https://sourceware.org/bugzilla/show_bug.cgi?id=19091
2015-10-08 16:34:45 +00:00
Rich Felker de06440f7e reorder sh/fdpic diff to match git diff output 2015-10-05 22:32:12 +00:00
Rich Felker bd17b1fbcd fix sh/fdpic issues found after first submission upstream
the following issues are fixed:

- ICE generating the new libgcc __ashlsi3_r0 and __lshrsi3_r0 shift
  operations for non-J2 SH2.

- new sh_legitimate_constant_p function was unused because there was
  an existing version with different signature which C++ allowed to be
  overloaded rather than reporting the error.

- reversed asm spec conditional for fdpic broke non-fdpic builds.

this commit rebases the patch against gcc trunk and backports the
result. file order has been tweaked by hand so that the diff is
friendly to manual inspection.
2015-10-05 22:31:31 +00:00
Rich Felker 1c19e88d21 update gcc static PIE patch to work with all targets
since -E is no longer passed to the linker, musl commit
6fc30c2493fcfedec89e45088bea87766a1e3286 is now necessary to get a
version of rcrt1.o that works with the new static PIE support, or
-Wl,-E can be passed manually to work with old rcrt1.o.
2015-09-30 01:20:14 +00:00
Rich Felker f872b28199 fix sh/fdpic 64-bit division code in libgcc
I originally missed the udiv_qrnnd part of the fdpic patch when
forward-porting it because longlong.h moved to a non-obvious location.
however, the original patch was broken anyway; it misordered
instructions at branch delay slots and clobbered in-use registers.

my version of the code is more efficient because it uses knowledge
that __udiv_qrnnd_16 is a pure-PIC function that makes no calls, uses
no static data, and does not clobber r12. this means we only need to
load the instruction address, not the got address, from the function
descriptor to make the call.

the same can be achieved even more efficiently by declaring
__udiv_qrnnd_16 with object type instead of function type and using
the existing non-fdpic asm unmodified. I did not do this because I was
afraid it would be considered a hack unacceptable for upstream.
2015-09-24 02:44:28 +00:00
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 5eb6f9add0 fix gcc's misdetection of sh as not supporting tls 2015-09-13 08:27:27 +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 596e008012 initial check-in 2015-08-25 19:32:46 +00:00