Commit Graph

201 Commits

Author SHA1 Message Date
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
Jonathan Schleifer
e0650f25c3 Build libsupc++-kernel without TLS 2014-07-20 20:32:34 +02:00
Oliver Tappe
c90d405154 Disable TLS support on x86_64 explicitly.
* Building gcc-4.8.3 on x86_64 with TLS support fails with an internal
  compiler error. Until that problem is fixed, don't use TLS on x86_64,
  which (due to libstdc++ compatibility) requires the same for the
  host cross compiler.
2014-07-03 19:43:24 +02:00
Adrien Destugues
2b103ca8be Enable TLS support in gcc.
Since hrev47198 we have ELF-based TLS support in Haiku. When building
gcc with haikuporter, this is detected by the configure script, but when
cross compiling gcc we need to manually enable it, as no runtime check
can be performed to detect the feature.

This should fix #10938 by avoiding the mix of TLS and non-TLS libstdc++.
2014-06-16 15:19:11 +02:00
Oliver Tappe
d4563ace72 Improve handling of Haiku clone without any tags.
* Error out early with a hint about how to solve the problem (by setting
  HAIKU_REVISION explicitly).
2014-05-31 15:35:24 +02:00
Jérôme Duval
c6d5c94217 Fix test in build_haiku_image. 2014-05-25 23:45:22 +02:00
Oliver Tappe
590b95e96e Add variable noDownloads to build_haiku_image.
* If noDownloads is set, show an error when a download is requested.
2014-05-01 19:45:19 +02:00
Oliver Tappe
8c54af563c Whitespace cleanup in root and 'build' folder.
* Removed trailing whitespace and empty lines at top of files.
2014-05-01 12:55:41 +02:00
PulkoMandy
574dbabb00 Configure the ARM compiler to default to Cortex-A8
Ideally, we would only need to set this in build/jam/board/*, but the
flags set there are not passed to the build of packages. The default is
using some early ARM variant, for which gcc lacks some more atomic
operations and emits calls to helper functions we don't implement.

Setting the default architecture avoids this, as all packages will now
be built to target the Cortex-A8.

Also set the proper VFP version in BeagleBoard config file.

Note this breaks the Verdex and Pi builds, but ARMv7 is what we should
focus on for now. We can try to make older archs work after finishing
the m68k port.
2014-04-22 09:49:32 +02:00
PulkoMandy
b8058ea8ee Disable multilib for the ARM compiler build.
* This avoids mixup of the soft/hard float libs
* It also means we can use the hard-float libs for targets that supports
it
* Again, we could introduce an arm_softfp compiler for targets that
don't have floating point support, with a different gcc build.
2014-04-21 21:21:28 +02:00
Jérôme Duval
b3ece9056d configure: --use-gcc-pipe now affects build_cross_tools_gcc4. 2014-02-09 10:06:43 +01:00
Jérôme Duval
4f57b13404 build_cross_tools_gcc4: enable posix threads.
* build kernel libgcc and libsupc++ with disabled posix threads for all
architectures. We currently change the configuration manually, as gcc
doesn't easily let us reconfigure without a full rebuild.
2014-02-05 23:38:18 +01:00
Jérôme Duval
1e93288e65 build_cross_tools_gcc4: unbreak --use-gcc-graphite.
* added -pipe to CFLAGS, builds are faster and /tmp usage is avoided at the
cost of more memory used.
* replaced ppl by isl as required by gcc 4.8
2014-01-28 19:18:14 +01:00
Ingo Weinhold
12c19e6362 Move creating the Haiku repo info to jam
* PreprocessPackageInfo rule: Pull out new rule
PreprocessPackageOrRepositoryInfo which does the sed substituation and
optionally the filtering through the C preprocessor.
* HaikuRepository rule: Generate the repository info file (from the
given template). No longer do that in the build_haiku_repository
script.
2014-01-19 00:49:10 +01:00
Matt Madia
9f1425e2f4 Use rsync instead of scp for uploading hakiu repository packages. 2013-12-01 07:17:48 -05:00
Matt Madia
62ee6508dd Tweak scp command, to prevent uploading repositoryDir as a subdir of $version.
If for some reason (e.g., a forced rebuild), Buildbot rebuilds the same hrev,
it was possible for the scp command to place the repositoryDir as a subdir
in $arch/$version/, instead of as $arch/version. This should ensure that the
contents of repositoryDir are placed in $arch/$version/.
2013-11-30 20:26:39 -05:00
Matt Madia
c738ee78e9 Added script for uploading the generated haiku repository.
The plan is for Buildbot to utilize this script and upload the packages
for each and every successfully built hrev. That portion is still in
progress.
2013-11-29 22:18:35 -05:00
Jeroen Oortwijn
467f4ab3a8 Fix for whitespace in paths
Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2013-11-26 02:06:09 +01:00
Ingo Weinhold
d85bab41bd Add target for building a Haiku package repository
* Add rule HaikuRepository to build a repository from a repository info
  file and a list of package files. It calls a build_haiku_repository
  script which does all the work.
* Add target <repository>haiku for building the Haiku package
repository.
  It should be built via "jam -q @alpha-raw build <repository>haiku";
  the build profile is only needed to activate all build features.
2013-11-23 01:46:04 +01:00
Ingo Weinhold
a27d687e2a Name the generated HPKG files properly
* rule AddPackageFilesToHaikuImage: Add "flags" parameter. The only
  supported flag is "nameFromMetaInfo". It causes the packages to be
  copied under their canonical file name onto the image.
* Use the new flag for all generated packages save haiku_loader.hpkg.
2013-10-09 03:48:26 +02:00
Ingo Weinhold
50ffb21291 update-{all,packages} build profile action: empty packages dir
... before copying the new contents to the image. This caters to the
typical use case of updating an existing Haiku, making manual
intervention to get the new packages activated unnecessary. The downside
is that manually added packages will be removed as well.
2013-10-05 22:49:48 +02:00
Ingo Weinhold
f73f5d4c42 Initial changes to remove /boot/common
* find_directory() and hard-coded paths use /boot/system instead of
  /boot/common.
* The build system creates the writable directories in /boot/system
  instead of /boot/common.
* The build system no longer installs any packages in /boot/common.
2013-10-03 21:52:25 +02:00
John Scipione
a7e9ce676f Use uname -s instead of uname -o
...since BSD uname (on OS X at least) doesn't have a -o param, only a -s,
Haiku has both, and both print "Haiku".
2013-09-17 14:40:22 +02:00
Ingo Weinhold
cf70d345b2 Merge remote-tracking branch 'haiku/master' into package-management
This reverts 8f7f28a7c3 (OpenGL: Upgrade
to
Mesa 9.2).

Conflicts:
	build/jam/BuildFeatures
	build/jam/HaikuImage
	build/jam/OptionalPackages
	build/scripts/build_cross_tools_gcc4
	src/add-ons/opengl/swpipe/Jamfile
	src/apps/diskusage/Jamfile
	src/kits/tracker/ContainerWindow.cpp
	src/kits/tracker/DeskWindow.cpp
	src/kits/tracker/Jamfile
2013-09-13 01:02:28 +02:00
Fredrik Holmqvist
f0aee2b4ea Enable targets for EFI on binutils.
objcopy needs to know about EFI targets if we want to build EFI Applications.
Also minor whitespace removal.
2013-08-28 19:59:56 +02:00
Ingo Weinhold
a1e681690c Rework rule CopySetHaikuRevision
* Remove support for VCSs other than git.
* Make the haiku-revision file a regular build target and make sure it
  is built only once.
* Make determine_haiku_revision an actual shell script and simplify
  it a bit.
2013-08-26 16:38:50 +02:00
Ingo Weinhold
86de8c37b5 Use GNU make also for building gcc 2
Should fix the build on {Free,Open}BSD.
2013-08-22 12:32:20 +02:00
Ingo Weinhold
987d25a40c build_cross_tools: use --with-hybrid-secondary when needed 2013-08-17 09:31:57 +02:00
Ingo Weinhold
37cfff1f04 build_haiku_image: filter duplicate packages
Resolving the package dependencies for system might yield packages that
are already given for common. Filter those out of the list for common
before resolving the common dependencies.
2013-08-13 15:31:22 +02:00
Ingo Weinhold
394c099f62 build_cross_tools_gcc4: use --with-hybrid-secondary 2013-08-07 02:13:15 +02:00
Ingo Weinhold
68ccc98930 Build the cross gcc for the secondary arch as such
Pass --enable-hybrid-secondary to gcc's configure when building it as
a secondary compiler. Doesn't make a difference for building Haiku
itself, but makes it easier to match the Haiku cross devel package with
the compiler when building bootstrap packages with haikuporter.

gcc 4 only ATM.
2013-08-04 17:21:20 +02:00
Ingo Weinhold
f975dc63f1 build_cross_tools_gcc4: move sysroot dir into install dir
This allows us to sneak in system include and library search dirs in
haikuporter without doing anything outside the cross tools dir.
2013-08-03 05:29:15 +02:00
Ingo Weinhold
159663ceba Remove no longer needed HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES 2013-08-01 08:54:05 +02:00
Ingo Weinhold
c0e8cc1a13 configure: prepare for hybrid support
The goal is to do hybrid builds in a single jam (instead of calling a
sub-jam to build parts with the secondary tool chain). This changeset
adds support to configure to prepare multiple tool chains.

configure:
* Merge option --build-cross-tools-gcc4 into --build-cross-tools. The
  option does now always require a packaging architecture parameter,
  i.e. x86_gcc2 for the legacy tool chain.
* Multiple occurrences of the --build-cross-tools and
  --cross-tools-prefix options are allowed. The first one specifies the
  primary tool chain, the subsequent ones the secondary tool chains.
* All architecture dependent jam variables are now suffixed with the
  name of the packaging architecture. The new HAIKU_PACKAGING_ARCHS
  contains the packaging architectures for the prepared tool chains. The
  first element is for the primary tool chain.
* No longer generate a separate libgccObjects file. Just put the
  respective variable into BuildConfig as well.

build_cross_tools[_gcc4]:
* Replace the <haiku output dir> parameter by a <install dir>
  parameter. This allows to create different cross-tools directories.
  They are simply suffixed by the packaging architecture.

Jamrules:
* For the moment map the variables for the primary tool chain to the
  respective suffix-less variables, so that everything still works as
  before.

The next step is to actually support the secondary tool chains in the
jam build system. This will require quite a bit more butchering, though.
2013-07-25 23:52:49 +02:00
Ingo Weinhold
111204e0d9 build_cross_tools: make the cross compiler more reuse friendly 2013-07-17 01:06:15 +02:00
Ingo Weinhold
c01380b1b7 Move package info pre-processing to jam build system
Also, pre-process all package infos (not only the generic ones) and
define the macro HAIKU_BOOTSTRAP_BUILD, if building a package for a
bootstrap image.
2013-07-07 15:02:29 +02:00
Ingo Weinhold
7418499c4a Remove more optional package related left-overs 2013-07-07 11:14:28 +02:00
Ingo Weinhold
d72ce06673 Adjust to changed HaikuPorts repository layout
The package kit actually requires the files "repo", "repo.info",
"repo.sha256" to be located under the repository base URL, so the
approach to name the repository file "repo-<hash>" doesn't work.
Now there's a directory "<hash>" which contains the files.

This commit moves the computation of the hash and downloading the
repository file from the build_haiku_image script to the jam build
system. The repo.info is also downloaded and a repository config file
is generated.
2013-07-06 02:29:51 +02:00
Ingo Weinhold
98c6dfa41e Switch build system from optional package to repositories
* Build libsolv and the dependency solver part of the package kit for
  the build platform.
* Add build tool get_package_dependencies. Given a list of package files
  and a list of repository files it determines the additional packages
  that need to be retrieved from the repositories and prints their URLs.
* Add rules to work with external repositories in the build system
  (build/jam/RepositoryRules):
  - PackageRepository declares an external repository with all its
    packages. The URL of the repository file isn't specified. It is
    computed from a given base URL and the SHA256 hash of the list of
    package files.
  - GeneratedRepositoryPackageList generates a file containing the file
    names of all packages in a repository.
  - IsPackageAvailable returns whether a package is available in any
    repository.
  - PackageURL returns the URL for a package.
* Declare the HaikuPorts repository for x86_gcc2
  (build/jam/repositories/HaikuPorts/x86_gcc2).
* Add rule AddHaikuImagePackages to add a package to the image and rule
  IsHaikuImagePackageAdded to determine whether a package has been
  added.
* OptionalPackages: Remove all entries that just downloaded and
  installed an external package. AddHaikuImagePackages can be used
  instead and is used in the remaining entries. Also move the remaining
  optional package dependency declarations from
  OptionalPackageDependencies here.
* ExtractBuildFeatureArchives: Instead of the URL parameter a package
  name must be specified now. This allows to simplify BuildFeatures
  significantly, since there's no dealing with URLs anymore. "if" out
  the entries that aren't supported yet.
* build_haiku_image: For the packages installed in system and common
  resolve their dependencies and download and install them as well.
2013-07-05 10:51:42 +02:00
Ingo Weinhold
2ebcd86dfe Add configure option --host-only
When specified, the build will be configured for building build host
tools only.
2013-07-03 23:19:00 +02:00
Oliver Tappe
49f8422a0d Remove whole sys-include folder when cross-compiler has been built.
* at least for gcc2, we used to leave the 'os' subfolder in there,
  which may have caused problems when Haiku's headers have changed
  since the last time the compiler was built.
(cherry picked from commit 92bb2fb33e)
2013-06-14 19:31:20 +02:00
Oliver Tappe
de2188e964 Fix #7824: failure to build a cross-compiler on Haiku.
* force creation of a cross-compiler for both gcc2 and gcc4 when
  building on Haiku (by suffixing the build and host machine with
  '_buildhost')
(cherry picked from commit df69e209bb)

Conflicts:
	build/scripts/build_cross_tools_gcc4
2013-06-14 19:30:55 +02:00
Oliver Tappe
92bb2fb33e Remove whole sys-include folder when cross-compiler has been built.
* at least for gcc2, we used to leave the 'os' subfolder in there,
  which may have caused problems when Haiku's headers have changed
  since the last time the compiler was built.
2013-06-14 16:07:06 +02:00