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`.
* 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>
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.
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>
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>
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.
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.
* 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
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.
* 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.
* 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
* 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
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.
* 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)
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)
* 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)