Fixes the
error: use of undeclared identifier 'HOST_HOOKS_INITIALIZER'
on Apple with M1 (silicon) chip
Fixes#17457
Change-Id: Id3b550c0d875d521539923ab7ecac0006715b7d6
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6191
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
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`.
Droped the `__cdecl` and `__stdcall` built-in macros except for
32-bit i386 compilation.
These macros refer to calling conventions that are specific to
32-bit x86 and have no meaning for other architectures. Using them
does nothing except producing a compiler warning.
These macros were present in BeOS times but only for i386. At the
time of writing, they are not used anywhere throughout the Haiku
source tree, and some HaikuPorts recipes even have to provide
workarounds for these macros' prescence.
Change-Id: I70369a64a71d8e29ccc0bd6282ba93832c1a6adf
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6384
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
* We decided to go with the more standadard __riscv, __riscv_xlen
* No references to these in Haiku source code
Change-Id: Ia3aa9c239a5313f404fad1163fac3334a10f0eb4
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6199
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This merge is made using the "ours" strategy so it does not change
anything to the master branch content. This is here only to make it
easier to do the next updates of binutils.
The process to update the binutils vendor branch is:
git checkout vendor-binutils # Work on the vendor branch
git rm -rf binutils # Delete the previous binutils version
wget http://.../binutils.tar # Download the new binutils version
tar xvf binutils.tar # Extract the new binutils version
mv binutils-2.36 binutils # Move the extracted directory in the correct place
git add binutils # Add the new files
git status # Make sure everything is ok
git commit -m "import binutils 2.36" # Commit the new version
git checkout master
git merge vendor-binutils # Merge the changes in the master branch
# Resolve conflicts as needed
When this process is followed, it is a lot easier to compare our branch
with the original sources:
git diff binutils/ vendor-binutils # Compare the binutils directory with the upstream version
There is also less risk to miss a patch when merging the changes,
because Git will keep track of the changes.
This process is named "vendor branches" and originates from SVN. It had
been used until binutils 2.28.1, but the next two updates were not done
this way. This commits sets us up to use this workflow again.
This creates a PT_EH_FRAME section in Haiku binaries,
allowing 3rd party unwind libraries (libunwind) to obtain
frame information for unwind procedures.
Change-Id: If475909d182bcac11024ebbc8220456733330fe8
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/5434
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Should fix the root cause of https://github.com/haikuports/haikuports/issues/4316
Some CPU architectures do similar things (for example because they don't
support PIC at all). So it should be fine to do it here. See for example
gcc/gcc/config/gcn/gcn.c
Change-Id: Ie23e4ece0d09c1083ad3c3bf43756f3207bbdafe
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/5194
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* Results in an internal compiler error: in do_spec_1, at gcc.c:5971
* %{!o*:-o %b} is "no output flag to linker, add one with input name"
* ld blah.o becomes ld blah.o -o blah
* We really shouldn't be playing with this in linker specs... It also
breaks on gcc 11.
Change-Id: I63d0afecd16f25423874419c0ac9496404b2069e
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4834
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
There was a comma in compile_commands.json after the last entry what
prevented from using file directly in some tools.
Test plan:
verified new compile_commands.json with "python3 -m json.tool compile_commands.json"
Change-Id: I6c2582f7285a3409d95081a93f3c05b5cc9322b9
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4671
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Version string was not updated for 10 years, but there were some changes made.
This commit updates the date to avoid confusion.
Test plan:
~/buildtools/jam> jam -v
Jam 2.5-haiku-20211020. OS=HAIKU. Copyright 1993-2002 Christopher Seiwald.
Change-Id: Ieea0ed2a533396f664948f58798acee0f6c811e9
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4618
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Running "./jam0 install" installed jam in /boot/common/bin/ which
is no longer used. Other directories also looked outdated so they
are updated too.
Test plan:
1. make
2. ./jam0 install
Install /boot/system/non-packaged/bin/jam
3. which jam
/boot/system/non-packaged/bin/jam
Change-Id: I69c719eab0bd211f545c17337e3bc73bb1ab78fe
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4617
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The call of make in buildtools/jam produces the following output:
LINKLIBS= ./jam0
...patience...
...found 271 target(s)...
...updating 33 target(s)...
MkDir1 bin.linuxx86
Cc bin.linuxx86/builtins.o
< reduced output >
Cc bin.linuxx86/variable.o
Archive bin.linuxx86/libjam.a
ar: `u' modifier ignored since `D' is the default (see `U')
ar: creating bin.linuxx86/libjam.a
...
'make' bootstraps 'jam0' which calls 'ar' to create the static library 'libjam.a'.
The call looks like this:
ar ru bin.linuxx86/libjam.a bin.linuxx86/builtins.o <reduced output> bin.linuxx86/variable.o
The modifier 'u' gets ignored.
The underlying cause is that the build was done in deterministic mode ('D'), a.o. NOT using timestamps, which is completely fine.
But because of this the archiver tool (ar) can never update files in the archive based on timestamps.
"ru" means replace files (flag 'r') only if they are updated (flag suffix 'u') based on timestamps.
This patch removes the flag suffix 'u'.
Change-Id: I57fa2d50c2081ee66d1b71648714e773ecb7cd59
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4419
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Warnings were:
Cc bin.linuxx86/fileunix.o
fileunix.c: In function ‘file_archscan’:
fileunix.c:217:6: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
217 | if( read( fd, buf, SARMAG ) != SARMAG ||
| ^~~~
| fread
fileunix.c:220:6: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
220 | close( fd );
| ^~~~~
| pclose
fileunix.c:272:3: warning: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimplicit-function-declaration]
272 | lseek(fd, offset + SARHDR, 0);
| ^~~~~
| fseek
Change-Id: Iedcdec01deb929d6c91ebc9d7eb72497fe078dd4
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4399
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Pointer to struct on stack was given instead of the calculated value.
Warning was:
Cc bin.linuxx86/expand.o
expand.c: In function ‘var_expand’:
expand.c:210:49: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘LIST *’ {aka ‘struct _list *’} [-Wformat=]
210 | printf("MAXSYM is too low! Need at least %d\n", l);
| ~^ ~
| | |
| int LIST * {aka struct _list *}
Change-Id: I65ab593287fc1b9aa2aba0056714726e29467012
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4398
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* This is a backport of a fix in binutils master and 2.37
commit: 235f5ef4a6b8fbdcfaea8b629f7c6a9792a789de
* Solves a dobuble-relaxation optimization in binutils under riscv64
Change-Id: I6a2ed520615b5e36bbb0003bf3a6a186c0aaeca1
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4412
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Cc bin.linuxx86/variable.o
variable.c: In function ‘var_defines’:
variable.c:121:46: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
121 | printf("MAXSYM is too low, need at least %d\n", val - *e);
| ~^ ~~~~~~~~
| | |
| int long int
| %ld
Change-Id: I389577a71416029fdff0f486af745ea482b14ddd
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4397
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Include header file for function prototypes hcache_init, hcache_done.
Note that include order is important, i.e. include has to be placed after the lists.h and rules.h includes.
Change-Id: Ic8a286662c8267bdfd19011b5ed8e825ee16d7ee
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4396
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Solves a new segfault encountered while linking our 32-bit
bios_ia32 loader under x86_64 (-m elf_i386_haiku)
backtrace:
_bfd_x86_elf_link_setup_gnu_properties() : reason: SIGSEGV
elf_i386_link_setup_gnu_properties()
ldelf_after_open()
lang_process()
main()
* I maintained our adjustments which differ / don't exist in
elf_i386. Lots of new code inclusions though in elf_i386
Change-Id: I9220730ba41bc029e40d1b4a8e5fbd85b312c1b5
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4375
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
* a82c1c - Base Haiku patches
* d113c7 - Fix powerpc gas target for Haiku
* e97614 - arm64 target support
* f91439 - don't require coff, we don't need it anyway
* c3903e - enable PE support for ARM
* f4963f - Add missing __exidx_* to fix arm bootstrap
Change-Id: I27d810fa49c38ed6e1548fc1f880bebb62ee0d64
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4374
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Change-Id: I06fc1c19229e26c20132c255c92b7e71ea3cc31a
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4372
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>