Commit Graph

101 Commits

Author SHA1 Message Date
Jessica Hamilton
9866b1a47a Add -rdynamic as a no-op, similar to -pthread.
Haiku binaries already export their symbols, which is the same
behaviour as using `-rdynamic` on other platforms; so add
`-rdynamic` as a no-op to simplify porting software that depends
on the behaviour of `-rdynamic`.
2023-05-08 22:27:04 +12:00
Jessica Hamilton
016003468a legacy/gcc: add -pthread no-op. 2022-03-23 02:13:11 +00:00
Alexander von Gluck IV
56d94c3a71 legacy/gcc: Fix cpp cross-tool prefix
* Noticed that our gcc2 randomly produces a "cpp" instead of a i586-pc-haiku-cpp
* A quick google search turned up a vintage patch for palmos which also
  fixes this issue:
  https://github.com/jichu4n/prc-tools-remix/blob/master/prc-tools-2.3/gcc-2.95.3.palmos.diff
* Confirmed it fixes the issue, and built a x86_gcc2 image without any
  issues

Change-Id: I33959248f10b69d64a4a9e430a9c254a162bcb53
Reviewed-on: https://review.haiku-os.org/c/1583
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-12 02:18:03 +00:00
Ingo Weinhold
aa5e614865 Bump legacy gcc version
Hasn't been done in a while.
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
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
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
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
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
Oliver Tappe
e5a1aa929a Bump version of legacy compiler. 2014-07-28 11:12:44 +02:00
Oliver Tappe
937988f044 Add crtbeginS.o and crtendS.o to configure.in, too. 2014-07-27 19:51:42 +02:00
Oliver Tappe
54883b1bb5 Let gcc2 use crtbeginS.o and crtendS.o, too.
* I doubt that this makes much of a difference, but it avoids yet
  another indirection in Haiku's build system.
2014-07-23 09:18:51 +02:00
Adrien Destugues
9bfca2f40f Fix prototype for atomic_add
bastring declares the prototype for atomic_add, as it can't rely on
haiku-specific headers. Have this declaration match the modified
prototype from Scheduler branch merge.

Matches commit 73ad2473e7874b3702cf5b0fdf4c81b747812ed9 on Haiku side.
2014-01-17 10:02:13 +01:00
Alexander von Gluck IV
6126596774 gcc: Reduce header search paths to only required
* As per the mailing list discussions.
* Only include the kit header paths that are
  currently external
2014-01-16 09:38:48 -06:00
Alexander von Gluck IV
fd576c8d8a gcc: Adjust gcc header search paths
* Drop /boot/common header paths
  I don't think pre-pm haiku will build anyway
  without using an older buildtools.
* Add secondary arch os header directories.
  Anything secondary arch that provides os
  headers will break without the proper search
  paths in gcc.
* Fixes secondary packages that depend on the
  OpenGL kit
2014-01-14 17:52:48 -06:00
Ingo Weinhold
6ff546f23b Bump legacy gcc version 2013-08-15 11:36:04 +02:00
Ingo Weinhold
86fe91bce2 legacy gcc: add --with-hybrid-secondary configure option 2013-08-15 11:34:28 +02:00
Ingo Weinhold
d36fc8e97b legacy gcc: declare some more include dirs C++ aware 2013-08-15 11:34:26 +02:00
Ingo Weinhold
2d0a2c6404 Bump legacy compiler version 2013-08-12 13:11:03 +02:00
Ingo Weinhold
e369b8e0bb gcc 2: Remove obsolete library and include search paths
Also clean up a few comments.
2013-08-12 13:06:01 +02:00
Ingo Weinhold
b1ef802cdc gcc2 x86_64 build support: pretend we're i386
That's even simpler than the previous approach, which resulted in
assembler errors in certain situations.
2013-07-21 20:57:56 +02:00
Ingo Weinhold
dd0e14964f Support building a cross gcc2 on x86_64
At least building the compiler seems to work on Linux (openSUSE 12.3).
Haven't tested whether the resulting Haiku works as well.
2013-07-21 19:48:12 +02:00
Oliver Tappe
ab0f66e995 Drop libio and libstdc++ from buildsystem of legacy gcc.
* libio can't be built without exposing glibc-internal stuff and
  we don't need either because Haiku provides its own version 
  of the legacy libstdc++
2013-07-17 19:11:17 +02:00
Ingo Weinhold
ce0819bf46 t-haiku: work-around the broken limits.h check
Checking for $(SYSTEM_HEADER_DIR)/limits.h doesn't work when
cross-compiling a native compiler, since that refers to the location of
the header on the target platform.
2013-07-17 00:43:19 +02:00
Oliver Tappe
bb9d1326db Bump version of legacy compiler. 2013-07-15 17:28:51 +02:00
Oliver Tappe
98d26c516f Reap more remains of fixinc.
* without these changes, gcc2 wouldn't build when using a cross-compiler
  on Haiku (complaining about missing '../specs' required by machname.h)
2013-07-15 16:06:18 +02:00
Oliver Tappe
ca289f92b0 remove duplicate header from configuration 2013-05-28 18:10:33 +02:00
Oliver Tappe
d0613f2026 Change format of version strings to full date, separated by underscore 2013-05-19 14:38:52 +02:00
Ingo Weinhold
6210a715b1 Merge branch 'master' into package-management
Conflicts:
	INSTALL-gcc2-from-source-Haiku
	build-gcc2-optional-package-Haiku.sh
	gcc/gcc/config/i386/haiku64.h
	legacy/gcc/gcc/config/i386/haiku.h
	legacy/gcc/gcc/version.c
2013-05-04 14:45:58 +02:00
Ingo Weinhold
a57415355d Bump version to 130425 2013-04-25 17:09:52 +02:00
Ingo Weinhold
1f1e659bdb gcc2: Add missing library and header search paths
* For /boot/common[/non-packaged] the standard include paths should be
  develop/headers/ as well instead of include/.
* Build the standard library search paths (the system and common ones)
  into the compiler as well. This makes setting the BELIBRARIES
  environment variable superfluous.
* The obsolete search paths (/boot/common[/non-packaged]/include/ and
  /boot/common/lib/ respectively) are still built in as well. They will
  be removed after a grace period, when all packages have been adjusted
  accordingly.
2013-04-25 17:09:50 +02:00
Oliver Tappe
278de7bc92 Bump versions of legacy compiler and binutils
* let's have a PM-specific version to lessen confusion
2013-04-21 23:21:14 +02:00
Adrien Destugues
24ebe81445 Add another standard C++ prototype for string::compare. 2013-04-21 23:04:33 +02:00
Joseph R. Prostko
a060af0916 Update GCC2 date versioning
* Due to recent changes by pulkomandy and myself, the date versioning must be updated
* A change to the configure script will follow this commit

Conflicts:
	legacy/gcc/gcc/version.c
2013-04-21 23:04:02 +02:00
Joseph R. Prostko
95f8bab5b6 Add gnu directory back to INCLUDE_DEFAULTS
* Done for both GCC2 and GCC4 buildtools
* Due to this change, hrev44719 will be reverted once new optional packages are built

Conflicts:
	legacy/gcc/gcc/config/i386/haiku.h
2013-04-21 23:03:18 +02:00
Adrien Destugues - PulkoMandy
99cc4338d7 Allow use of c_str() when <charT> != char
http://gcc.gnu.org/ml/libstdc++-prs/2000-q4/msg00004.html
This allows use on std::wstring, and others.
2013-04-21 23:02:20 +02:00
Adrien Destugues - PulkoMandy
855732f929 Add missing tan(), tanh() and log10() for std::complex.
These are part of the C++ standard, I don't know how they went missing
in our version.
http://www.cplusplus.com/reference/std/complex/

They are needed to build MathGL library, and likely other stuff.
2013-04-21 23:02:08 +02:00
Oliver Tappe
87efb055fb Bump legacy compiler version.
Conflicts:
	legacy/gcc/gcc/version.c
2013-04-21 22:59:52 +02:00
Oliver Tappe
64e25a9475 Define __STDC_ISO_10646__ in our gccs.
* define __STDC_ISO_10646__ to '201103' in order to indicate that
  Haiku's wchar_t supports the Universal Character Set (UCS) defined
  by the ISO 10646 standard published in March 2011.
(cherry picked from commit 073cb9127c)
2013-04-21 22:58:49 +02:00
Matt Madia
fdc4d2f79b Prevent fixing the includes.
Forcibly prevent fixinclude from executing. This prevents the spawning of a
shell process, which would be abandoned due to fixinc crashing.

Submitted By: BLFS Book <blfs-book@linuxfromscratch.org>
Date: 2003-10-05
Initial Package Version: 2.95.3
Origin: BLFS Book
http://www.linuxfromscratch.org/blfs/view/5.1/general/gcc2.html
(cherry picked from commit ef37057d92)
2013-04-21 22:53:36 +02:00
Oliver Tappe
1fea500c21 Add more generated files of legacy gcc to .gitignore
(cherry picked from commit 41126db379)
2013-04-21 22:53:34 +02:00
Oliver Tappe
c88591af88 Add autom4te.cache to .gitignore
(cherry picked from commit 7f3fb010ff)
2013-04-21 22:53:31 +02:00
Oliver Tappe
e925619d1f Trying to fix #8063 (failure to build gcc2 when updating info files):
* remove all *.info targets so the gcc2 build system doesn't
  try to update them, as that doesn't always work because of
  apparent incompatibilities with newer makeinfo versions

git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@42999 a95241bf-73f2-0310-859d-f6bbb57e9c96
(cherry picked from commit 32fb726909)
2013-04-19 21:58:21 +02:00
Adrien Destugues
8b70c20ed2 Add another standard C++ prototype for string::compare. 2013-01-05 11:19:40 +01:00
Joseph R. Prostko
48a09beb0a Update GCC2 date versioning
* Due to recent changes by pulkomandy and myself, the date versioning must be updated
* A change to the configure script will follow this commit
2012-10-31 23:54:19 -04:00
Joseph R. Prostko
6be228270a Add gnu directory back to INCLUDE_DEFAULTS
* Done for both GCC2 and GCC4 buildtools
* Due to this change, hrev44719 will be reverted once new optional packages are built
2012-10-31 23:43:01 -04:00
Adrien Destugues - PulkoMandy
5f2852400d Allow use of c_str() when <charT> != char
http://gcc.gnu.org/ml/libstdc++-prs/2000-q4/msg00004.html
This allows use on std::wstring, and others.
2012-10-27 15:56:05 +02:00
Adrien Destugues - PulkoMandy
72f47ffea0 Add missing tan(), tanh() and log10() for std::complex.
These are part of the C++ standard, I don't know how they went missing
in our version.
http://www.cplusplus.com/reference/std/complex/

They are needed to build MathGL library, and likely other stuff.
2012-10-27 15:42:44 +02:00