Commit Graph

668 Commits

Author SHA1 Message Date
François Revol
8865c113a6 gcc: correct LINK_SPEC for m68k
We need to allow undefined symbols to link libgcc now...
2016-07-20 04:40:19 +02:00
Jérôme Duval
97e06d2ad6 Merge gcc 5.4.0. 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>
2016-03-08 21:28:51 +00:00
Jérôme Duval
3dd8d8f58c update reference to gcc4.
* to trigger the build.
2016-03-04 20:27:59 +01:00
Jérôme Duval
cf9f358f9e gcc: add missing mask blank in ctype_base.h 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 419211519c.
"* 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.
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>
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>
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>
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 148cc99040.
It broke the build on Linux.
2015-08-07 17:22:50 +02:00
Jérôme Duval
7c3622a5de gcc: rest clean up after 15ab9ca51d. 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.
2015-07-25 23:32:16 +02:00
Jérôme Duval
cd374ba049 gcc: clean up after 15ab9ca51d. 2015-07-25 21:06:48 +02:00
haiqu
15ab9ca51d MIPS: Fix cross-tools build.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-07-25 10:40:49 -04:00
Jérôme Duval
e2963a55e6 Merge binutils 2.25.1
Conflicts:
	binutils/gas/configure.tgt
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.
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. 2015-07-22 19:32:23 +02:00
Jérôme Duval
3801b878c2 Merge gcc 4.8.5 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.
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.
2015-04-20 03:06:37 +02:00
François Revol
0dfb79fe88 binutils: fix PPC GOT issue
Simplify haiku-specific ppc emulation script, and reuse
common code, which seems to fix the linker issue mentioned
in #10240:
_GLOBAL_OFFSET_TABLE_ not defined in linker created .got
2015-04-20 03:06:24 +02:00
François Revol
c5588ee1b4 gcc: update ppc linker emulation name 2015-04-20 00:11:14 +02:00
François Revol
ab21027f8a binutils: rename elf_ppc_haiku emulation to elf32ppchaiku
For coherence with other targets.
2015-04-19 17:21:46 +02:00
François Revol
b2f43673a6 binutils: reorder ppc dependency 2015-04-18 19:17:02 +02:00
Jérôme Duval
a05bd9155a Merge binutils 2.25
Conflicts:
	binutils/bfd/config.bfd
	binutils/ld/Makefile.am
	binutils/ld/Makefile.in
2014-12-26 12:16:05 +01:00
Jérôme Duval
36fac57968 import binutils 2.25 2014-12-26 11:26:52 +01:00
Jérôme Duval
1a00a76b58 Merge gcc 4.8.4 2014-12-21 12:11:47 +01:00
Jérôme Duval
514f593381 import gcc 4.8.4 2014-12-21 12:08:20 +01:00
mshlyn
ff47abe8d7 Fix x86 configure option for crosscompile on Linux
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes #11150.
2014-11-07 21:38:45 +01:00
Jessica Hamilton
c2607d0bbd jam: add internal dependencies for multi-file generating actions
* Based on https://svn.boost.org/trac/boost/changeset/39341
2014-10-21 20:57:59 +13:00
Adrien Destugues
d86116d57a Forgot to fix LDBL_MIN... 2014-10-15 11:45:49 +02:00
Adrien Destugues
e7b6630b6b gcc2: rewrite LDBL_MIN/MAX/EPSILON without hex-floats.
* Values are taken from http://www.opengroup.org/csq/repository/appendix/oracle/iscl_appendix.html
* Confirmed to give the same results as the constants used in gcc4
* Should work in C++, where gcc2 doesn't support hex-floats
2014-10-15 08:29:00 +02:00
Adrien Destugues
4319c0ca13 gcc2: fix LDBL_MIN, LDBL_MAX, and LDBL_EPSILON
While the union trick used there gave the correct results, it made the
defines non-constants so they couldn't be used properly in some cases.

In particular, this makes the testsuite for gettext and some other GNU
packages fail as they explicitly test for these being constants.
2014-10-14 17:58:00 +02:00
Jessica Hamilton
c700a4fe64 Don't switch on -shared if the user specifies -r.
* Follow up to btrev43090, to include platforms missed in
  original commit.
2014-10-13 04:15:32 +00:00
Nick Smallbone
aeb1fcf62f Don't switch on -shared if the user specifies -r
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-10-04 14:41:05 +13:00
Paweł Dziepak
862b5480a9 jam: do not set OPTIM by default
If setting OPTIM by jam basically makes it impossible for the project that
is using jam to set its own optimization level while still allowing user
to override that in command line. For example in Haiku jam files there is
line like this: "OPTIM ?= -O2", which obviously is meant to set optimization
level to O2 unless user overwrites it. Unfortunately, because Jam have already
set OPTIM to -O this line never had an intended effect.

After this Jam no longer thinks it knows best what is good for projects
that are using it and Haiku is by default compiled with -O2.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-08-25 22:58:39 +02:00
Ithamar R. Adema
6f9a8fa02b ARM/gcc: make LINK_SPEC match our other platforms.
It looks like shared/nostart was not properly handled. These changes
were copied from the x86_64 specs.
2014-08-21 16:41:43 +02:00