Commit Graph

243 Commits

Author SHA1 Message Date
Jessica Hamilton
e9e00b80c0 cross_tools: allow specifying a custom sysroot path
* Use with --sysroot /path/to/sysroot; useful for CI
  environments and cross-building.

Change-Id: I27a93a5d209cd5324591587e85fce9b47c18172d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5318
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2022-06-05 09:08:20 +00:00
Augustin Cavalier
db0b7d8401 build: Use $rmAttrs and $(RM) in more places instead of 'rm' directly.
Should not result in a functional change in most cases, but it might
on some systems without full xattrs or emulation.
2021-09-06 15:59:44 -04:00
Augustin Cavalier
d8ffdea39e build/scripts: Add missing set -e to rm_attrs. 2021-09-06 15:58:03 -04:00
Zoltán Mizsei
e7e3b6c14a build/cross_tools_gcc4: explicit disable libatomic and libgomp
Change-Id: If8cad96420cd249106c611aaf59353adab1271ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3897
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-05-06 08:13:40 +00:00
Fredrik Holmqvist
9e4c5cf124 Add -std=c++14 to build_cross_tools_gcc4
CLang fails to build ISL otherwise, and if you are setting up
cross compiling, you should have a modern enough compiler

Fixes #16434

Change-Id: Ieb4a33015899896ea3bb2d1abc59b10fe0b4b3f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3730
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2021-02-02 17:44:47 +00:00
Alexander von Gluck IV
d123849688 build/cross-tools: explicitly set ISA for riscv64
* Enable TLS for riscv64. For now select a dummy
  implementation.
* RISC-V has a register (tp) dedicated to TLS
* All the "desktop-like" RV64 chipsets implement GC
* Same ISA we currently build for... but calls it out
  in-case defaults change.

Change-Id: I623b6e5c309b6a6e80ec378e456b2335c561269d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3632
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-20 19:38:01 +00:00
Alexander von Gluck IV
f598f71cd5 build/cross_tools_gcc4: x86_64, explicit enable-multilib
* This was originally added circa 2012. via hrev43954
* Our toolchain appears to work fine now with explicit
  multilib enabled.

Change-Id: I1f5d55c63a6b3b6ab1c4db95da3d14d5ef2da0df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3315
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-10-15 12:48:38 +00:00
Alexander von Gluck IV
c33a98eebc build/scripts/gcc2: Specify -fcommon as the default changed in gcc10
* gcc10 changed to -fno-common default
* Resolves #16520

Change-Id: I9af2234532177f2153159eea94a05a106587ebbb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3317
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-10-14 15:36:20 +00:00
Adrien Destugues
12ef216972 build_haiku_image: no fs indices on CDs
The iso9660 filesystem does not support them
2020-07-22 17:48:32 +02:00
Adrien Destugues
5b80a2fa0d build_haiku_image: don't recreate indices when updating
mkinex fails when the indices already exist.
2020-07-21 18:38:06 +02:00
Adrien Destugues
c5aa9dfb4c Create filesystem indices when creating Haiku image
Fixes #4424.

Change-Id: I737ee4f9bb70ce48c0c94f3a862a3073da8c0c4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2796
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-07-18 14:00:10 +00:00
Fredrik Holmqvist
7cea5bf07f Remove graphite building, we have gcc with these deps in build
When we moved ISL, MPFR, GMP and so on inside GCC we no longer
need to do any specific building to support graphite.
2020-07-18 15:19:17 +02:00
Augustin Cavalier
dd419e59dc build_haiku_image: Distinguish between system (activated) and unactivated packages.
Previously, all packages on the image, both activated and unactivated,
were in $systemPackages, so if a package actually in /system/packages
had a dependency in the Installer optional package area, the dependency
checking would see no problem but the generated image would be broken.

Now, packages going into /system/packages are treated separately
from those going elsewhere, and error checks added so the above
condition will not occur.

(I ran into this while working on the build-package upgrade
in the following commits.)
2020-04-19 17:53:10 -04:00
Alexander von Gluck IV
cb837539f5 build/scripts: make toolchain scripts more self-sustainable
Change-Id: Ibe4cf105a20184392498371ba770529d69bd61a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-24 18:24:13 +00:00
Alexander von Gluck IV
3d4c153e17 buildtools: Disable tls on riscv64 for now
Change-Id: I8084e0fa2ffbaf04242fa14617807d83abbd5586
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1556
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-21 12:00:51 +00:00
Alexander von Gluck IV
890224c31c scripts/find_triplet: Fix shell, requires bash not sh
Change-Id: Ie8219230810856c2a5f1c99bb6f3162eeff0964e
2019-08-19 09:05:52 -05:00
Alexander von Gluck IV
925d9f1909 build/scripts: Add find_triplet to allow easy solving of arch to gcc triplet 2019-08-01 10:36:01 -05:00
Augustin Cavalier
d511533a48 build_cross_tools_gcc4: Keep static libstdc++, but rename it.
The gcc_bootstrap recipe still needs it, it seems.
2019-06-16 20:30:53 -04:00
Augustin Cavalier
9bb9cc8896 build_cross_tools_gcc4: Remove the generated static libstdc++.
We always want to use the shared one from the syslibs package,
never the shared one from this build.

Part of #14842: after this change, the ICU build now fails with
"cannot find libstdc++" instead of an invalid symbol.
2019-06-15 15:42:13 -04:00
Augustin Cavalier
4dd5af2f75 build_cross_tools_gcc4: Handle $PATH having spaces in it properly.
Fixes the build of the cross tools under WSL.
2019-02-21 14:02:13 -05:00
Augustin Cavalier
5a7156f435 build_cross_tools_gcc4: Clear "missing" scripts instead of touching files.
This just stops the errors from occuring rather than trying to
rebuild the files at all. This is much cleaner, and solves
a few cases that the other method did not.
2019-02-21 14:01:40 -05:00
Augustin Cavalier
849f58107a build_cross_tools_gcc4: Enable initfini-array in binutils.
Our implementation of it now behaves properly after the last commit.

Change-Id: I6bebc91ae0f9512ea07ad6a7a4ccea9ee758e01b
Reviewed-on: https://review.haiku-os.org/c/908
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-28 16:37:28 +00:00
Augustin Cavalier
b3dc16eecb build: Use xorriso instead of mkisofs or genisoimage.
It seems that not all Linux distributions ship an EFI-enabled
cdrtools (i.e. mkisofs takes -e option), Arch being one that
does not.

So instead, we now use xorriso universally, which is
as (or more, in most cases) widely available, and supports
emulating mkisofs with the EFI commands universally.

This also has the added benefit that we can drop genisoimage
support altogether.
2019-01-08 19:31:15 -05:00
Augustin Cavalier
17640964db build_haiku_image: Remove obsolete copyright concatenator.
All third-party software is now packaged and we ship the licenses
directory.
2018-11-15 20:32:22 -05:00
Augustin Cavalier
d8b0a13568 build_cross_tools: export ACLOCAL to stop GCC from trying to use it.
This should fix the build of the crosstools on Haiku, CentOS, and
other platforms with versions of autofools too old or too new for
GCC 7.
2018-11-10 14:41:55 -05:00
waddlesplash
2d9270e859 determine_haiku_revision: Properly get rid of the commit hash.
Change-Id: I3f57b1cd4d819e7f531001d747bf7b103954a918
Reviewed-on: https://review.haiku-os.org/581
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-18 19:50:52 +00:00
Augustin Cavalier
563a1a0da1 determine_haiku_revision: Rework "no tag on HEAD" output.
When HEAD is tagged, the output will be identical to what it was
before (the latest hrev tag and nothing else.) When HEAD is not tagged,
and the most recent tag is further back, we now use a format like this:

hrevXXXXX+N(+dirty)

... where N is the number of commits since hrevXXXXX, and +dirty is added
if the working tree is dirty. This is significantly shorter than the
previous model (as it does not have the Git revision.)

Fixes #14445.

Change-Id: Ide7f66cf0ac1c1f05402afc52b6be3b68b66d6dc
Reviewed-on: https://review.haiku-os.org/566
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-09-16 00:09:14 +00:00
waddlesplash
d28caaed68 build_cross_tools: Also touch .in files to prevent their regeneration.
Change-Id: Id893460327fd6db064c6fc0fb4de8e6ada1b1773
Reviewed-on: https://review.haiku-os.org/496
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-28 21:27:50 +00:00
waddlesplash
d34addaf3f build_cross_tools: Compile GCC2 as 32-bit everywhere.
It is just straight up broken on most systems without this, as
the same "cast specifies signature type" appears there too.

Exactly why this fixes the problem does not appear to be any more known
than it was when this was first instated in 2012.
2018-08-27 22:25:18 -04:00
waddlesplash
2cf7d49495 build_cross_tools: Touch configure scripts so the Makefiles don't regenerate them. 2018-08-27 19:06:22 -04:00
waddlesplash
75f7932ae2 build_cross_tools_gcc4: Forcibly disable maintainer mode.
This should stop GCC from trying to reconfigure.
2018-08-26 22:24:45 -04:00
waddlesplash
d1feb7cb60 build_cross_tools: Have scripts exit on failure.
Previously they just silently continued, which meant that if part of the
cross-tools build failed, you would have to scroll back pretty far to
see what the failure was.
2018-05-19 14:54:10 -04:00
Alexander von Gluck IV
82876dc4cb build_cross_tools_gcc4: Disable TLS on PowerPC for now
Change-Id: Ib99a1a4aeeb5d17a301ffd1d9c5fcadd37261ebf
2018-02-28 21:46:24 -06:00
Augustin Cavalier
825700d34a configure: Rewrite implementation of --update.
Previously --update was kind of a hack, as it just dumped all
the variables from BuildConfig back into ./configure and attempted
to rerun from there.

Instead, now we store all of the variables and environs configure
was invoked with in the top of BuildConfig and re-call it using them.
This is much more robust, as configure will actually recompute
all of the values from the BuildConfig.

As a side effect, if configure was originally invoked to build crosstools,
it would have done so again, so instead add a check to see if they
exist, and skip them if they do. It's easy enough to delete the
directory if you want to force a crosstools rebuild.

Briefly discussed with mmlr on IRC.
2017-12-04 20:14:18 -05:00
Jessica Hamilton
6cc6f04747 build_cross_tools_gcc4: bring in sync with native compiler.
* Previously, the cross-compiler would generate code that doesn't
  run on Haiku, particularly where TLS is concerned. It also ended
  up with a c++config.h header incompatible with the version in
  the native compiler.
* Now possible to correctly cross-compile rust for Haiku.
2017-09-05 21:41:39 +00:00
Jérôme Duval
03820c114a Update binutils_x86 and binutils for x86_gcc2 and x86_64.
* starting with 2.27, binutils defaults to initfini-array instead of init and fini,
this leads to problems in Haiku, just disable for the time being.
2017-08-06 14:12:28 +02:00
Adrien Destugues
fda0bf77fb Revert "repo rework: Re-add compatibility url field"
Revert "repo rework: Remove stubs; Breaks repo compat."
Revert "repo rework: Remove need for repos to be self-aware"

This reverts commit a2b2f4d642.
This reverts commit 602076ef82.
This reverts commit 5ffaf72c8a.

These changes break the build on Haiku and the ability to create repo
mirrors, for the lack of a replacement for the URL (an UUID was evoked
on the mailing lists, but not implemented).

We are due for a release soon, please don't break the build.
2016-12-10 12:55:56 +01:00
Alexander von Gluck IV
5ffaf72c8a repo rework: Remove need for repos to be self-aware
* See #12917 for details.
* Squashed to one commit to make revert easy if we
  run into any issues.
* pkgman is now pre-attached to the 'current' repo
  version within nightly images so they can be updated
  by default.
* This shouldn't impact us keeping older sets of package
  versions by commit hash for building older hrevs.
* There are XXX stubs with "Kill me". These will need
  to be dropped after users are given sufficent time to
  upgrade. We're dropping a previously required field (url)
  so making this a slowish roll out.
* Makes the repos a lot less restrictive which should
  help PM package building automation be a bit easier.
* Once this stuff smooths out, we'll add UUID's to the
  repo definitions for duplicate repo detection.
2016-12-02 00:41:06 -06:00
François Revol
e409118307 configure: pass proper gdb target for m68k 2016-10-20 13:30:33 +02:00
François Revol
4da6cf8403 configure: allow building GDB along with the buildtools
from a stock GDB source tree.

I was getting tired of doing it manually.

Note the prefix is not exactly the same as the buildtools since the
machine triplet is different, but it's not an issue.

Tested with arm and ppc with GDB 7.8. Might need patching gdbTarget for other archs,
as stock GDB doesn't know about Haiku.
2016-10-20 11:14:50 +02:00
François Revol
96c72d6933 typo 2016-10-20 11:14:50 +02:00
Jérôme Duval
11ece1736c build_cross_tools_gcc4: disable libatomic. 2016-05-03 21:05:31 +02:00
Adrien Destugues
d958d336a8 Try to fix the ARM cross-tools build
* Gcc5 does not allow both --with-arch and --with-cpu anymore, so use just --with-cpu.
2016-03-04 20:04:41 +01:00
François Revol
1c91ed03fa Build binutils with different extra targets depending on arch
EFI support isn't much useful for ARM.

Also add some targets to help debugging binutils on PPC.
2015-04-18 15:14:24 +02:00
Oliver Tappe
8e77a6439a Fix #11458, pt.3: invoking jam from source dir does not work.
* Adjust build_haiku_repository script to invoke package_repo without
  -C <dir>, as that is not needed and has the unintended side-effect
  of rendering relative package paths non-functional.
2014-11-16 15:58:03 +01:00
Ingo Weinhold
96a321df07 bootstrap image: Add remote command execution script
In order to automate the complete bootstrap build process we need a
mechanism to control the second phase which builds the final packages
on the booted bootstrap Haiku. To avoid additional dependencies
(buildbot slave, ssh, rsh,...) we'd have to cross-build, there's now a
pair of simple python scripts that allows executing commands on a remote
machine. The server script (bootstrap_daemon.py) is added to the
bootstrap image and started automatically during the boot.
2014-10-30 16:43:54 +01:00
Oliver Tappe
11ae3c5fe7 Cleanup build system and configuration.
* Drop unused variables from build system that refer to the system
  libraries.
* Drop unused lists of libgcc objects.
* Drop no longer used variables from configuration script.
* Remove no longer needed building of kernel-libgcc and -libsupc++ from
  build_cross_tools_gcc4, only the boot-specific (32-bit) libs are
  built for a x86_64 target.
* Explicitly disable threads and TLS support when building the cross
  compiler, as the only libraries that are used by Haiku's build system
  is the 32-bit libgcc and libsupc++ for the bootloader on x86_64 (and
  for that neither is wanted).
2014-08-13 13:32:45 +02:00
Jessica Hamilton
1a6ec00140 Re-enable TLS on x86_64 when cross-building.
Building gcc on x86_64 with TLS enabled has been fixed,
so this is to keep cross-builds and native builds in
sync.
2014-07-22 21:26:57 +12:00
Arvind S Raj
6d345e6c9d Fixed hrev47542 changeset to become sh compatible.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-07-22 14:45:19 +12:00
Arvind S Raj
d1e057eefb Disable building gcc with TLS support since ARM build fails due to undefined references 2014-07-22 02:03:32 +12:00