Commit Graph

237 Commits

Author SHA1 Message Date
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
Jérôme Duval
133e4131fe Added some support for GCC 8. 2017-05-13 11:37:22 +02:00
Alexander von Gluck IV
deb1a31972 Revert "configure: Add host as valid build target in help."
This hack is no longer needed.

This reverts commit ea74aafd98.
2017-02-17 13:12:51 -06:00
Alexander von Gluck IV
b2bdabc797 arm: Add beaglebone target, rename beagle
* beaglebone vs beagleboard
* While the boards are almost the same, they have
  diff. FDT's now (more memory, different layout etc)
* Make u-boot script more rpi-like
  (depend on u-boot for initial addresses)
* Wasn't working, still doesn't.
2016-10-20 11:05:46 -05: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
Jérôme Duval
c9dba74273 Added some support for GCC 7. 2016-05-05 18:20:26 +02:00
Jeroen Oortwijn
ea74aafd98 configure: Add host as valid build target in help.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-15 21:02:02 -05:00
Jonathan Schleifer
c6fb0e2c4d
configure: Disable Clang's integrated assembler
We have too much code that doesn't work with it yet and it makes more
sense to get the other parts working with Clang first.
2015-11-08 22:11:28 +01:00
Jonathan Schleifer
a7bddff13e
configure: Cleaner way for --use-clang 2015-11-08 16:00:14 +01:00
John Scipione
299467d2a3 configure: remove set -e
This was added in hrev47174 but isn't needed. (confirmed with jessicah)

the -e flag was causing the script to exit when it encountered an error
instead of allowing us to print an error message and exit ourselves.
I accidentially tried to compile Haiku on a case-insensitive FS and
tripped over this.

The configure script should print an error message if you try to configure
on a case-insensitive FS once again.
2015-11-02 16:30:39 -08:00
John Scipione
7a05e252c8 configure: Update the case-sensitive FS error text
Remove the second line so that it fits in 80 chars and the sentence does not
end in a proposition; reads better.
2015-11-02 16:29:50 -08:00
François Revol
961fc581b7 configure: Fix copy-paste from hrev49029 2015-10-30 01:53:10 +01:00
François Revol
736bd376e9 configure: remove help text for --remote-user
This option got removed in hrev46738.
2015-10-30 01:49:58 +01:00
Jérôme Duval
94887feb64 Added some support for GCC 5+. 2015-07-20 21:45:02 +02:00
Alexander von Gluck IV
9c5e234cb3 arm: Initial Cubieboard4 work
* SD cards are "blessed" with a boot0 spl and boot1 u-boot
  at fixed locations.
* Allwinner's u-boot is lacking a lot.
* Upstream u-boot should be better at some point. WIP:
  http://lists.denx.de/pipermail/u-boot/2015-January/201537.html
2015-04-11 16:53:04 -05:00
Alexander von Gluck IV
87236c4fb3 jam/arm: Add missing overo target board 2015-03-16 10:38:36 -05:00
Alexander von Gluck IV
620dfc84e9 configure: Fix arm target boards in help 2015-03-15 15:24:23 -05:00
Alexander von Gluck IV
427d40adb5 arm/targets: Add rpi2, rename raspberry_pi to rpi1
* The Raspberry pi 2 uses a new SoC which differs slightly
  from the Raspberry Pi 1.
* Someday these two board targets could go away when we get
  FDT support.
2015-03-07 12:31:12 -06:00
Jonathan Schleifer
c9dd05ff40 configure: Add variable to see if we're bootstrapping 2014-10-26 21:07:57 +01:00
Oliver Tappe
7f9beaf1f8 Fix #11110: problems invoking configure.
* configure without arguments used to work on Haiku, but it no
  longer did since hrev47574 - fix the usage check to make it
  work again.
2014-08-30 21:42:12 +02:00
Adrien Destugues
3e6c09cdfb configure: make nasm check compatible with BSD grep.
The BSD grep doesn't know about \s. Moreover, checking for elf (rather
than ELF) seems to make more sense, as that's the format name, not part
of the description.

Patch suggested by geist. Thanks!
2014-08-22 12:16:53 +02:00
Ithamar R. Adema
21af7e541f ARM: remove all references to sfdisk
sfdisk is no longer used by the ARM build, since we can handle
everything with mtools (using mpartition instead of sfdisk).
2014-08-17 14:34:25 +02:00
Oliver Tappe
87e8603d9f Merge branch 'gcc_syslibs'
* From now on, the gcc-specific system libraries (libgcc, libsupc++ and
  libstdc++) are provided by separate packages built along with gcc:
  - gcc_syslibs contains the shared libraries (libgcc_s.so, libsupc++.so and
    libstdc++.so)
  - gcc_syslibs_devel contains the static libraries and both c++ and gcc
    headers
  The shared libraries now make proper use of symbol versioning and there
  are version-specific symlinks
* The buildsystem has been adjusted to no longer use the libraries and
  headers from the cross-compiler, but use the ones provided by the
  above-mentioned packages. The only exception is that the 32-bit libraries
  required for the bootloader of the x86_64 architecture are still taken
  from the cross-compiler.
2014-08-13 13:50:29 +02: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
François Revol
cb721c5963 Add a nasm test for ELF generation
We should probably only test this when targetting x86 arch...
2014-08-06 01:05:50 +02:00
Oliver Tappe
410d94cf86 Update version of legacy compiler. 2014-07-28 11:15:16 +02:00