Commit Graph

262 Commits

Author SHA1 Message Date
Andrew Lindesay
17dc34acd6 HaikuDepot: Build Configure for Python
Some operating systems only ship with Python 3 and the
binary for this is 'python3' instead of 'python' which
causes the Jam build process to fail because it expects
to find 'python'.  This change will mean that the
configure process will detect this case and configure
the build to use the correct binary name.

Fixes #14938

Change-Id: I30cd0df828792715a54d760b86dd79aee04e2b2f
Reviewed-on: https://review.haiku-os.org/c/1134
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-03 07:49:25 +00:00
Adrien Destugues
5629675a32 sparc: add defines and minimum set of required files
Gets the stage0 bootstrap to run.
Imlementation is probably nonsense at this point.

Change-Id: I10876efbb54314b864c0ad951152757cdb2fd366
Reviewed-on: https://review.haiku-os.org/c/1061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-23 16:30:50 +00:00
Augustin Cavalier
1d91b37193 build: Fixes to support building in paths with spaces in them.
Now that HAIKU_TOP is a relative path, nearly all paths Jam actually
has to deal with will never contain spaces, so this is now feasible.
Only one issue remains after this commit (namely, setting
HOST_BUILD_COMPATIBILITY_LIB_DIR.)
2019-01-09 19:18:28 -05:00
Augustin Cavalier
d4c38925ba configure: Restore execute bit.
It seems "git stash" on Windows loses filemodes... sorry about that.
2018-11-23 18:40:47 -05:00
Augustin Cavalier
807304b100 build: Add basic support for MinGW hosts.
This doesn't fully work yet (the FS code in libroot_build
needs to be adapted, as some of the symlink-related calls
are not available on MinGW), but it gets much further than
the "Cygwin" target did.
2018-11-23 16:24:25 -05:00
Augustin Cavalier
37c106060a build: Remove support for cross-building from Cygwin and SunOS.
These have been broken for a long time. Some Cygwin changes that
are relevant on MinGW are kept here, but users on Windows who
want to build Haiku should probably use WSL at this point.

However, now that we are using relative paths and don't need
to worry about drive path kludges, it's actually possible to
get some host tools built on MinGW. Changes for that coming.
2018-11-23 15:40:50 -05:00
Augustin Cavalier
241b61a7f5 Revert "configure: Change default ARFLAGS to use deterministic mode."
This reverts commit da693d1fdc.

GCC2 binutils doesn't like this. As mentioned in the previous commit,
"u" is a no-op on modern binutils and only issues a warning.
2018-11-21 21:16:40 -05:00
Augustin Cavalier
da693d1fdc configure: Change default ARFLAGS to use deterministic mode.
Jambase now expects this (and its defaults were changed); and this
is already the default on most systems, so adding this should
silence the "D is now the default mode" warning.
2018-11-21 19:16:50 -05:00
Alexander von Gluck IV
5bd0fbd13a build: Add riscv architecture
* I mean, qemu 3.0 supports it.
* Nobody get excited, we need all the triplets added to
  our gcc buildtools. clang 7.0 seems to be cool with riscv though.

Change-Id: I17728163e4f28a3c16cee482a253364724b06f3a
2018-11-04 13:47:50 -06:00
Augustin Cavalier
3facc270ea Jamrules: Force HAIKU_TOP to be relative.
Prior to hrev47631 (2014), HAIKU_TOP was relative when jam was invoked
from the repository root, and not relative when jam was invoked from
any other location, including "generated." In hrev47631, Jamrules
was changed to be as it was before this commit, in order to fix #11101
(Haiku repository creation failed due to the use of relative paths.)

GCC, however, injects the full path passed to the compiler into some
symbols under certain circumstanes (anonymous namespaces, for one),
and so a relative path for more reproducible builds is preferred.
It seems the aforementioned bug is no longer with us, as a full image
build that I did with this change worked just fine.

Note that you will have to run "configure --update" after this
in the case that you usually invoke "jam" from the generated directory,
as the Jamfile configure generated included absolute paths. (The reminder
to do that this diff includes can be removed after some reasonable amount
of time.)
2018-11-01 20:56:04 -04:00
Augustin Cavalier
ca20bd2e48 configure: Account for umasks < 0022.
It seems recent Debian has a umask of 002, interestingly enough;
and so the original check failed there.

Thanks to luroh for reporting!
2018-10-27 14:00:56 -04:00
Augustin Cavalier
02f3646adc configure: Ensure the git checkout was not done with a restrictive umask.
It seems that the old buildbots had their (ancient) checkouts done with a
restrictive umask, and this meant that some files in buildbot-generated
builds were not readable by "world" as they should have been.

Now instead of just verifying the umask itself is not too restrictive,
we also validate the "SetupEnvironment" script in the tree has mode 644.

Fixes #14085.
2018-10-20 23:03:14 +00:00
Augustin Cavalier
b57e7df9ef configure: Clean up BuildConfig generation and add HOST_CC.
We do a lot of checks against the CC specified in environment,
but we never pass it into the BuildConfig, so we have no guarantee
that's what Jam's actually using.

Additionally remove HAIKU_BOOT_BOARD while we're at it (nothing uses
it anymore), and reorder the sections in BuildConfig to make a little
more sense.
2018-08-15 14:40:03 -04:00
Augustin Cavalier
252e4f6299 configure: Set a default LINKFLAGS in addition to LDFLAGS.
The former is passed to the compiler when linking using it,
the latter is passed to ld when it is invoked directly.

Also modify ArchitectureRules to not overwrite this setting.
2018-08-15 14:19:30 -04:00
Augustin Cavalier
20c61bb7a4 Revert unrelated changes from previous commit.
I should have read the update script more closely as to
how it added changes for committing...
2018-08-13 15:58:01 -04:00
Augustin Cavalier
5924b6e410 configure: Guard against using Clang < 7 for builds.
Only Clang 7+ has -fno-delete-null-pointer-checks.
2018-08-13 15:54:53 -04:00
Autocomitter
ef9994ee77 Update translations from Pootle 2018-08-13 19:45:39 +00:00
Augustin Cavalier
fb4cc98472 build: Add initial ARM64 target.
It will probably be just stubs for the significant future, but,
here it is anyway.

Regarding the naming: Yes, the official name is "aarch64." However,
Linux, FreeBSD, and Zircon all call it "arm64", and so we will do the same.

I've configured it initially to be a Clang-only port, making no
changes to GCC buildtools whatsoever here. We'll see if that sticks,
however.
2018-08-02 19:48:29 -04:00
Augustin Cavalier
d9f698eaf0 configure: Fix copying clang_headers for non-x86 architectures.
Also allow Clang for PowerPC builds.
2018-08-01 20:11:10 -04:00
Alexander von Gluck IV
20dbf03267 configure: Allow Clang for ARM builds. 2018-08-01 19:31:01 -04:00
Augustin Cavalier
a107d3b4f9 configure: Do --update check earlier.
Previously we initialized variables and ran a few $CC tests first
(which was what the old version of --update needed.) Now, we can do it
almost immediately after the script begins.

Spotted by running --update on a GCCless system (as the $CC tests
gave warning messages due to no GCC, while CC= was set in --update
environs.)
2018-08-01 19:23:18 -04:00
Augustin Cavalier
1c307243f5 configure: Detect lld and elfedit properly under Clang. 2018-08-01 19:17:53 -04:00
Augustin Cavalier
c44472c541 Enable use of Clang's integrated assembler. 2018-08-01 19:09:22 -04:00
Augustin Cavalier
101564e415 configure: Fix "unsupported target architecture" message. 2018-07-03 19:04:53 -04:00
Augustin Cavalier
32b50a8831 configure: Add missing word-boundary marker to test invocation.
Fixes specifying a secondary cross-arch that is a substring of the first
(e.g. "x86_gcc2"+"x86".) Thanks to nielx for noticing!
2018-06-23 17:13:24 -04:00
Augustin Cavalier
c124995713 configure: Cleaner grouping of compiler settings.
Now, instead of breaking them up, all settings related to or gleaned
from the compiler are listed first (except for BOOT_CXXFLAGS_...).
No functional change intended.
2018-06-18 19:32:14 -04:00
Augustin Cavalier
6c5fcb4f14 configure: Move deduplifying targetArchs to where HAIKU_PACKAGING_ARCHS is built.
If one specifies a cross-tools path instead of --build-cross-tools along
with --use-clang, then the specified architecture winds up in the list twice,
as the first test looks for the arch name where only "unknown" exists
(since in the case of cross-tools paths, we delay fetching the arch.)
So we need to move this check to there instead.
2018-06-18 19:32:13 -04:00
Augustin Cavalier
ddf7f64365 configure: If set, pass the cross-tools-prefix when invoking Clang.
This lets clang use our linker and other binutils instead of its own.
Now clang builds produce a working bootloader and get all the way
to the "rocket" icon, at which point userland init fails.
2018-06-18 19:32:13 -04:00
Augustin Cavalier
b337e9a8fd Remove HAIKU_INCLUDE_PATENTED_CODE.
Nothing uses it anymore. Fixes #8935.
2018-06-13 18:07:30 -04:00
waddlesplash
1f839e89e6 configure: Rebuild cross-tools if GCC configure is newer than built GCC. 2018-05-22 20:43:11 -04:00
Augustin Cavalier
43f5f35a80 configure: Make sure the output directory exists before running xattr tests. 2018-04-14 20:30:05 -04:00
Alexander von Gluck IV
e5d446fcc9 configure: Improve toolchain validation
* Seeing an issue on our builders where the toolchain directory
  exists, but the gcc binaries do not.
* Check for the path, as well as the actual compiler binaries
  to improve detection of need to rebuild toolchain.

Change-Id: I54fd5789e3255c8295136bb0614e72c5393718fe
2018-03-01 09:39:26 -06:00
Augustin Cavalier
8a9e1e0d4a Removal of non-Haiku target platform logic from build system (part 1.)
Following recent changes to use libroot_build on Haiku also, it is now
actually impossible to build Haiku components on non-Haiku platforms
(BeOS R5, Dan0, BONE, Zeta), so we can remove any logic related to this.

This is only the first part; still to be removed are:
 * SetSubDirSupportedPlatformsBeOSCompatible
 * HOST_PLATFORM_BEOS_COMPATIBLE
 * TARGET_PLATFORM_BEOS_COMPATIBLE
2017-12-31 16:14:22 -05:00
Augustin Cavalier
503ef6d4dd build: Correct libroot_build's usage of xattrs on a Haiku host.
Implemented by just not defining the functions at all and letting
the Haiku ones shine through. In the future, though, we should wrap
them properly.

(Between the switch to libroot_build and this commit, libroot_build
was using the generic attribute emulation layer on Haiku ... whoops.)
2017-12-14 19:36:14 -05:00
Augustin Cavalier
36f28382db configure: Properly test for set crossToolsPrefix and targetArchs.
Now you can specify a --build-cross-tools and then override just
GCC from it with a following --use-clang in the same configure
invocation.
2017-12-12 20:07:38 -05:00
Augustin Cavalier
fc2c93fbec configure: Enable use-xattr or use-xattr-ref automatically.
The previous commit only checked that they worked if the user
enabled them, but now they will be enabled automatically if the
underlying filesystem supports them.

The ReadMe.Compiling has been updated accordingly.
2017-12-05 17:14:28 -05:00
Augustin Cavalier
a5c952db0d configure: Actually check the host's support for extended attributes.
Previously the helptext just displayed a warning to "make sure your
file system supports sufficient attribute sizes", and left the
actual checks to libroot_build at runtime.

Now we use the native command-line tools of each platform to make sure
that we can actually set attributes large enough for --use-xattr and
--use-xattr-ref respectively.
2017-12-05 17:14:02 -05: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
Augustin Cavalier
9c292427ec configure: Remove totally useless --enable-multiuser switch.
It's not used anywhere in the build system at all.
2017-12-02 23:27:09 -05:00
Augustin Cavalier
1f6fe0559b build: Copy and use Clang's vector intrinsics headers.
When compiling with GCC, these headers get pulled in from the
gcc_syslibs_devel package, but we cannot do something similar
for Clang as Clang adds/removes internal builtins used by
the headers nearly every version. So instead we just copy
all the intrinsics headers from current Clang into generated,
and make sure this directory is included before any others.
2017-12-01 21:16:13 -05:00
Augustin Cavalier
6570684235 configure: Further fixes to Clang support.
* Actually locate the clang executable, and allow user overrides
 * Properly preserve arguments in get_build_tool_path
 * Fix get_build_tool_path for commands with dashes (e.g. "clang-5.0")
2017-12-01 14:23:57 -05:00
Augustin Cavalier
e042a53b7d configure: Avoid bashism introduced in previous hrev. 2017-11-23 20:21:38 +01:00
Augustin Cavalier
d73993ff20 configure: Fix & enhance --use-clang.
Now you set the arch along with the argument, and specify the binutils
manually (and thus build without a complete crosstools environment.)
2017-11-23 19:40:00 +01:00
Augustin Cavalier
c6c03d566e Reinstate umask test into configure now that the buildbots have been fixed. 2017-07-31 17:33:51 -04:00
Jérôme Duval
ec89bb26a7 Revert "configure: Ensure that umask is not too restrictive."
Please reapply when someone is available to adjust the buildbot config.
2017-07-31 18:23:58 +02:00
Augustin Cavalier
70dde0b360 configure: Ensure that umask is not too restrictive.
There have been some odd bugs in the past possibly caused by this,
so guard against it.

Discussed with PulkoMandy.
2017-07-30 17:18:30 -04:00
Augustin Cavalier
ff0184bed0 Remove GPL-add-ons build machinery.
No longer used by anything (it appears some old kernel drivers that
are not included in the build might use it, but I don't know why
they need it -- we already ship GPL'd code [libntfs] for the kernel
in the default build unconditionally.)

Briefly discussed with js a few weeks back.
2017-07-30 14:13:42 -04:00
Axel Dörfler
84edb1a177 configure: Bumped GCC version to 2.95.3-haiku-2017_07_20.
* Script would fail otherwise, thanks korli!
2017-07-20 10:01:20 +02:00
Alexander von Gluck IV
f2ed9d80f6 configure: Drop target-board for arm/ppc 2017-07-10 15:16:09 -05:00
Alexander von Gluck IV
855fc5a0d3 platform/u-boot: Build all fdt's and include in u-boot mmc
* Eventually BoardSetups and target boards will go away.
* Include all known fdt's in the mmc image
* This gets us closer to target board-less arm
* Changing hardware is as simple as plugging a new fdt
  into u-boot's startup script.
* Drop my original rpi1 work.  We're targetting ARMv7
  minimum.
2017-07-09 22:19:51 -05:00