535 Commits

Author SHA1 Message Date
Augustin Cavalier
a7eeaa62ba gcc: Synchronize Makefile.in with HaikuPorts one.
Includes a fix for the x86_64 GCC build from Jerome.

Fixes #14179.
btrev43128
2018-06-03 12:05:19 -04:00
waddlesplash
9f5168c3d9 Remove the ancient patches directory.
Nothing referenced it.
btrev43127
2018-05-22 20:54:10 -04:00
waddlesplash
8651cd3f95 Further fixes to get GCC 7.3 actually working for Haiku builds.
Partially from @jarekpelczar's work, but only certain pieces that
were needed, and the rest is either from earlier GCC patches
or is my own work.

With this, GCC 7 can now build Haiku.
btrev43126
2018-05-19 23:00:50 -04:00
Alexander von Gluck IV
51ec6d2217 gcc: Initial Haiku support patches based on gcc 5.x 2018-03-20 09:59:01 -05:00
Alexander von Gluck IV
ffa48efe31 import previous mpfr,mpc,gmp 2018-03-19 15:46:45 -05:00
Alexander von Gluck IV
3d544ab266 import gcc 7.3.0 2018-03-19 15:34:23 -05:00
Jérôme Duval
923a34a14b jam: use posix_spawnp() instead of fork() on linux.
the gain is about 10% on a 8-job kernel full build.
btrev43125
2018-01-06 16:48:36 +01:00
Augustin Cavalier
20a46bd5f9 bfd: Fix build with newer texinfo. btrev43124 2017-11-11 14:01:56 +01:00
Jérôme Duval
35041506a0 Merge binutils 2.28.1 btrev43123 2017-08-06 14:09:36 +02:00
Jérôme Duval
8b2ef03baf import binutils 2.28.1 2017-08-05 16:32:14 +02:00
Ingo Weinhold
aa5e614865 Bump legacy gcc version
Hasn't been done in a while.
btrev43122
2017-07-20 07:52:55 +02:00
Ingo Weinhold
9167fe74f5 legacy gcc: remove "#pragma once" warning
"#pragma once" is no longer obsolete. In fact it is the preferred header
guard method.
2017-07-20 07:52:55 +02:00
Adrien Destugues
259af3cf06 Increase MAXSYM and add sanity checks.
I had jam crash in strange ways because a stack-allocatted aray was
overflowing. Double the limit, and add sanity checks with exit and clear
error messages in case it happens again.
btrev43121
2017-07-16 19:40:50 +02:00
Jérôme Duval
233c0fb351 import binutils 2.27 2016-10-10 16:55:00 +02:00
Adrien Destugues
560f4f562f Legacy binutils: do not link against Flex.
Flex is not needed, and creates some confusion when building the
binutils on Haiku. Just remove all the checks from the configure script,
so it is never used.
btrev43120
2016-07-24 18:10:22 +02:00
Jérôme Duval
68e96393c7 Merge binutils 2.26.1 btrev43119 2016-07-21 21:36:13 +02:00
Jérôme Duval
5dcc710c26 import binutils 2.26.1 2016-07-21 21:35:07 +02:00
François Revol
8865c113a6 gcc: correct LINK_SPEC for m68k
We need to allow undefined symbols to link libgcc now...
btrev43118
2016-07-20 04:40:19 +02:00
Jérôme Duval
97e06d2ad6 Merge gcc 5.4.0. btrev43117 2016-06-05 13:33:52 +02:00
Jérôme Duval
7f478ec453 import gcc 5.4.0 2016-06-05 13:00:18 +02:00
Paweł Dziepak
aaf3dee62e gcc: reassign copyright to the FSF
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
btrev43116
2016-03-08 21:28:51 +00:00
Jérôme Duval
3dd8d8f58c update reference to gcc4.
* to trigger the build.
btrev43115
2016-03-04 20:27:59 +01:00
Jérôme Duval
cf9f358f9e gcc: add missing mask blank in ctype_base.h btrev43114 2016-03-04 18:01:05 +01:00
Jérôme Duval
7c77083396 gcc: Add to lists of i[34567]86-*-* and x86_64-*-* soft-fp targets. 2016-03-04 17:58:26 +01:00
Jérôme Duval
137b14625b Merge gcc 5.3.0 2016-02-29 11:09:52 +01:00
Jérôme Duval
f8056f83f7 import gcc 5.3.0 2016-02-29 10:41:25 +01:00
Jérôme Duval
661fb7cf18 gcc4: revert partially 419211519c79edc7af6fca9c6a3233129ec54d7d.
"* LINK_SPEC: Pass "-shared" to the linker only if it was passed to gcc; output
      position-independent executables by default;" is reverted to workaround a
link failure on gcc4 with binutils 2.26: add-ons objects would fail to link
against an executable (being no more a shared object). This is possibly temporary
until the need for executable as shared objects is fully reviewed.
btrev43113
2016-02-28 15:33:41 +01:00
Jérôme Duval
b9cfe212c1 Merge binutils 2.26 2016-02-10 19:02:55 +01:00
Jérôme Duval
69285d07c6 import binutils 2.26 2016-02-10 18:58:24 +01:00
Simon South
7af7a81a60 gcc2, gcc4: Correct LINK_SPEC
Correct LINK_SPEC so it

* Sets appropriate dynamic-link options for any type of dynamically
  linked executable, not only position-independent ones.
* Does not omit these options if "-pie" is specified by the user.
* Recognizes the "-static" option.
* Includes a hyphen previously missing from "--no-undefined".

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
btrev43112
2015-11-04 17:35:16 +01:00
Simon South
f2b5a31fc1 binutils (legacy): ld: Set ELF interpreter to "/system/runtime_loader"
This aligns legacy ld with the changes committed in 0b1666c.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
btrev43111
2015-11-02 21:10:16 +01:00
Simon South
465fb4d4a7 gcc2: Allow the user to build non-PI executables
This aligns legacy gcc with the changes to gcc4 committed in 4192115 and
the two subsequent commits.  It also disables legacy ld's default
behaviour of recursively resolving shared-library dependencies at link
time, preventing missing-library warnings during the build and aligning
ld's behaviour with that of more recent versions.

gcc2:

* CPP_SPEC: Replace non-existent command-line options with valid
  equivalents.
* CC1_SPEC: Remove non-existent "no-fpic" option; add "fno-pic" and
  "fno-PIC" as options that disable the generation of
  position-independent code; use "-fPIC" by default.
* LINK_SPEC: Pass "-shared" to the linker only if it was passed to gcc;
  output position-independent executables by default, exporting all
  symbols to match the behaviour of "-shared"; when building a
  dynamically linked executable, do not recursively add shared libraries
  as dependencies but do allow unresolved symbols in them; specify
  "-Bsymbolic" only when building a shared library.
* All: Wrap lines at 80 columns; use more compact notation where
  available.

ld:

* Do not recursively resolve shared-library dependencies when building
  an executable if the "--no-add-needed" and "--allow-shlib-undefined"
  options are in effect.  This effectively backports binutils commits
  8fbb09e and 4706eab.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-11-02 21:09:55 +01:00
Simon South
a0d6e40ddd gcc: ppc: Remove now-redundant CC1_SPEC
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
btrev43110
2015-10-28 18:05:34 +01:00
Simon South
0b1666ccbe binutils: ld: Set ELF interpreter to "/system/runtime_loader"
For x86_64 this includes defining a new linker emulation, "elf_x86_64_haiku"
(to match the existing "elf_i386_haiku") and updating gcc accordingly.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-10-28 18:05:28 +01:00
Simon South
bfa8159478 gcc: LINK_SPEC: Gently refactor
Update LINK_SPEC (for arm, i386, x86_64 and ppc) with more compact but
functionally equivalent sequences.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-10-28 18:05:22 +01:00
Simon South
aff4b1860d gcc: CC1_SPEC, LINK_SPEC: Wrap lines at 80 columns
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-10-28 18:05:15 +01:00
Simon South
419211519c gcc: Allow the user to build non-PI executables
* CC1_SPEC: Remove non-existent "no-fpic" command-line option; add
  "fno-PIC" and "fno-PIE" as options that disable the generation of
  position-independent code; use "-fPIC" by default.
* LINK_SPEC: Pass "-shared" to the linker only if it was passed to gcc; output
  position-independent executables by default; when linking executables, allow
  undefined symbols in shared libraries and export all symbols (to match the
  behaviour of "-shared").

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-10-28 18:05:10 +01:00
Jérôme Duval
f625dd9f94 Revert "jam: Fix build/run on Windows."
This reverts commit 148cc99040fabc451e143a5011abee967c9d80f1.
It broke the build on Linux.
btrev43109
2015-08-07 17:22:50 +02:00
Jérôme Duval
7c3622a5de gcc: rest clean up after 15ab9ca51d2. btrev43108 2015-07-30 18:57:17 +02:00
Jérôme Duval
03e3047c8a gcc: don't define JCR_SECTION_NAME when TARGET_NO_JCR_SECTION_NAME.
We define TARGET_NO_JCR_SECTION_NAME in haiku.h and remove the hack in
defaults.h. Depending on __HAIKU__ at this place isn't correct.
btrev43107
2015-07-25 23:32:16 +02:00
Jérôme Duval
cd374ba049 gcc: clean up after 15ab9ca51d2. btrev43106 2015-07-25 21:06:48 +02:00
haiqu
15ab9ca51d MIPS: Fix cross-tools build.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
btrev43105
2015-07-25 10:40:49 -04:00
Jérôme Duval
e2963a55e6 Merge binutils 2.25.1
Conflicts:
	binutils/gas/configure.tgt
btrev43104
2015-07-24 21:31:12 +02:00
Augustin Cavalier
148cc99040 jam: Fix build/run on Windows.
Only works when compiled in 32-bit mode, as there's a whole bunch
of pointer arithmetic that depends on "int" being 32bit, not 64bit.
btrev43103
2015-07-23 16:45:11 -04:00
Jérôme Duval
597b3bdc8b import binutils 2.25.1 2015-07-23 20:15:18 +02:00
Jérôme Duval
52fa22bd84 gcc: sync configure.ac with configure and regen. btrev43102 2015-07-22 19:32:23 +02:00
Jérôme Duval
3801b878c2 Merge gcc 4.8.5 btrev43101 2015-07-11 09:17:00 +02:00
Jérôme Duval
a1af220a6f import gcc 4.8.5 2015-07-11 09:14:42 +02:00
François Revol
5ba2e24764 gcc: fix PPC LINK_SPEC so bootstrapping gcc works again
Same fix as btrev43088: turn off -no-undefined for -shared and -nostart.
btrev43100
2015-04-20 16:57:25 +02:00
François Revol
519355391e gcc: force -fPIC instead of -fpic by default on ppc
Works around "relocation truncated to fit: R_PPC_GOT16 against symbol" issue
mentioned in #10240. PIC uses a larger GOT which doesn't overflow, unlike pic.
btrev43099
2015-04-20 03:06:37 +02:00