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.
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.
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.
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.
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.
* 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.
* 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)
* 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
* add HAIKU_PACKAGING_ARCH, which is set to the target packaging
architecture
* introduce support for generic package infos, which are package infos
that are the same for all architectures, except for the declaration
of the package architecture itself
* move package info files underneath architecture-specific or generic
folder
* BuildHaikuPackage rule: Create the script that contains the extraction
commands.
* build_haiku_package: Add extractFile() function (stripped down version
from build_haiku_image).
In build_haiku_image the functionality was mainly used to extract the
optional packages, which is no longer done. We still need it e.g. for
the Wifi firmware packages that want to be extracted.
It allows to control the compression level used for package creation
and update. The default (9) is *very* slow, so developers may want to
use a smaller level during the regular development process to keep
turn-around times low.
* Update MimeSet rule to use the MIME DB the build system creates.
* Add CreateAppMimeDBEntries rule and call it from Link for targets that
might be applications that need to be registered with the MIME DB. For
the target the rule is invoked with it creates a directory into which
the entries for the types to be registered are written. The directory
is associated with the target via the HAIKU_MIME_DB_ENTRIES variable.
* AddFilesToContainer: If a target is added that has MIME DB entries,
also add those to the container.
* build_haiku_package: Call mimeset for the package contents.
* build_haiku_image: Remove MIME DB creation code.
* Rename beos_mime source directory to mime_db.
* Add rules to build the MIME DB in the source directory's jamfile.
* Add MIME DB directory to haiku.hpkg in data/mime_db.
* libsupc++ wasn't required, the build failed on x86_64.
* PPL: --disable-maintainer-mode configure option seems not enough to avoid an autoconf launch.
Solved by redefined AUTOCONF AUTOHEADER ACLOCAL AUTOMAKE variables to the noop command "true".
* PPL: make could run autoconf in certain conditions, thus generating artefacts
in the source tree. Added --disable-maintainer-mode when launching
configure to avoid this situation.
* cleanup: there are no info files in CLooG and PPL.
If no hrev tags are found the revision is blank and shows up as
0 in About System. This commit updates the revision function so that
it falls back to the current short hash instead. Only affects devel
builds and only if you've deleted your tags.
Setting 'HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES = 1' will enable the
mechanism. By default all packages will be stripped. Passing anything
other than '1' or 'true' in the InstallOptionalHaikuImagePackage call
will disable it for a particular package.
Turns out that libgcc is needed, for some reason building the kernel
with -O0 does not end up referencing libgcc but -O2 does. A separate
build of it is done with -mno-red-zone, same reason as for libsupc++.
Ended up being easy to rebuild with different CFLAGS: previously I'd
tried doing `CFLAGS="-mno-red-zone" make` in the libgcc dir which
didn't override, the correct way is `make CFLAGS="-mno-red-zone"`
Kernel mode code on x86_64 needs to be built with -mno-red-zone as
interrupts would corrupt the red zone if it were in use. However, the
kernel is linked with libsupc++, which was not compiled with
-mno-red-zone. If an interrupt occurred in libsupc++ code the red zone
would get corrupted. This was causing random panics, particularly under
heavy system load. Therefore, on x86_64 a separate build of libsupc++
with -mno-red-zone is now done for the kernel to use. Note: this commit
will require a rerun of configure and rebuild of cross tools.
Some preference apps, mount_server and AboutSystem. Removed the check
for x86_64 in the boot script, the normal path through the script will
work now. Also removed a temporary hack to workaround AboutSystem not
being there in build_haiku_image.
The boot script now launches consoled instead if app_server does not
exist, so there is now an interactive Bash prompt! libbe requires ICU,
which is an optional package, so I've built the packages and they've
been uploaded to haiku-files.org (thanks umccullough).
GCC 2 built for OS X 10.7/10.8 was broken, the Haiku build would fail
with some strange errors. Forcing compilation of GCC 2 in 32-bit mode
results in a working GCC.
This appears to be a problem with GCC's build system: it defaults to having
multilib enabled, but if it is explicitly enabled with --enable-multilib,
the build fails.
Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
* Apparently caused by the fact that we no longer run fixincludes,
math.h is not being generated anymore. I haven't removed the rm
from the script in order to be compatible with older compilers.