Commit Graph

158 Commits

Author SHA1 Message Date
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
cc91b333be configure: update required legacy compiler version 2013-08-21 16:45:48 +02:00
Ingo Weinhold
483b28e478 Add option --target-arch
On Haiku it allows to specify the target architecture to build for
using one of the installed native compilers.
2013-08-12 17:18:02 +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
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
ef57df3d81 configure: remove BeOS support
Likely doesn't work anymore anyway.
2013-07-25 23:52:49 +02:00
Ingo Weinhold
e173a1ec1c Integrate building the HaikuPorts bootstrap packages
* Add configure option --bootstrap which allows specifying the
  haikuporter and HaikuPorts repository paths.
* Add rules for supporting a second repository type. The
  PackageRepository rule is now private and RemotePackageRepository is
  used for remote repositories. The new BootstrapPackageRepository rule
  is for defining a bootstrap repository (there will probably be only
  the HaikuPorts cross repository) whose packages can be built as needed
  via haikuporter.
* Rename DownloadPackage to FetchPackage.
* Define repository HaikuPortsCross.
* HaikuCrossDevel package(s): There are now two sets of packages: A
  "stage1" set with the same content as before and a final set
  additionally containing the libraries libbe, libnetwork, libpackage.
  Those are needed for building the libsolv bootstrap package while for
  building them we need other bootstrap packages (ICU, libz).

This is basically all that's required to build a bootstrap Haiku
completely from sources, with a few caveats:
* There's no ICU bootstrap recipe yet (so one has to cheat and use the
  prebuilt package ATM).
* Probably doesn't work on Haiku yet (tested on Linux only).
* A 32 bit environment must be used (otherwise building the gcc 2
  bootstrap package fails).
* Building with multiple jobs doesn't work yet, since haikuporter uses
  common directories for building different packages and there's no
  explicit serialization yet.
* Haven't tested the resulting image save for booting it. So it probably
  needs a bit more work before it can actually build the final
  HaikuPorts packages.
2013-07-21 04:10:48 +02:00
Ingo Weinhold
fc8967f1a6 Determine HAIKU_CPU and HAIKU_PACKAGING_ARCH in configure
... instead of in BuildSetup.
2013-07-20 01:01:21 +02:00
Oliver Tappe
983aba2983 Adjust configure script to new version of legacy compiler. 2013-07-15 17:32:44 +02:00
Ingo Weinhold
3942ca0d5e configure: fix sha256sum/sha256 checks 2013-07-06 12:19:46 +02:00
Ingo Weinhold
2a5d0aafa6 configure: set new variable HOST_SHA256
sha256sum and sha256 are detected.
2013-07-06 02:17:15 +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
Ingo Weinhold
bc96e8f30c Add more robust generic attribute emulation variant
The new configure option "--use-xattr-ref" enables an xattr assisted
variant of the generic attribute emulation. Instead of using the inode
ID of a node to identify its attribute directory, we use a reasonably
unique random 128 bit number, which we generate and attach as an
attribute to the node. This way, when a node changes its inode ID
(defragmentation?) or the inode ID of a removed node with a left-over
attribute directory is reused, attributes won't get mixed up.

The old method is still used for symlinks (since on Linux only
priviledged users can write attributes on symlinks), but those usually
only have a rather boring BEOS:TYPE attribute, so mix-ups wouldn't be
that problematic anyway.
2013-06-07 02:27:48 +02:00
Oliver Tappe
dff45dfced Updated version of compiler to match BuildtoolsPM 2013-05-19 21:35:39 +02:00
Ingo Weinhold
25a7b01d15 Merge branch 'master' into package-management
Additional changes:
* Add src/system/kernel/lib/zlib, which builds a kernel version of zlib,
  needed by packagefs.
* BuildFeatures: Add a build feature "gcc2" to allow for easier checks.
* Referenceable.cpp: Include <OS.h> instead of <debugger.h>. The latter
  is not needed and prevents building for the build platform.
* zlib/zutil.h: Fix gcc 2 build. We really should use the external
  package instead.

Conflicts:
	.gitignore
	build/jam/BuildSetup
	build/jam/FileRules
	build/jam/FloppyBootImage
	build/jam/HaikuImage
	build/jam/ImageRules
	build/jam/KernelRules
	build/jam/NetBootArchive
	build/jam/OptionalBuildFeatures
	build/jam/OptionalLibPackages
	build/jam/OptionalPackageDependencies
	build/jam/OptionalPackages
	build/scripts/build_haiku_image
	configure
	data/bin/installoptionalpackage
	data/system/boot/Bootscript
	headers/os/app/Message.h
	headers/os/package/PackageInfo.h
	headers/os/package/PackageInfoAttributes.h
	headers/os/package/PackageInfoSet.h
	headers/os/package/PackageRoster.h
	headers/os/package/PackageVersion.h
	headers/os/package/hpkg/PackageInfoAttributeValue.h
	headers/os/storage/FindDirectory.h
	headers/os/storage/Node.h
	headers/os/support/StringList.h
	headers/private/system/directories.h
	src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
	src/add-ons/kernel/file_systems/packagefs/AttributeIndex.cpp
	src/add-ons/kernel/file_systems/packagefs/Jamfile
	src/add-ons/kernel/file_systems/packagefs/Package.cpp
	src/add-ons/kernel/file_systems/packagefs/Package.h
	src/add-ons/kernel/file_systems/packagefs/PackageDomain.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageDomain.h
	src/add-ons/kernel/file_systems/packagefs/PackageFSRoot.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkDirectory.h
	src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageLinkSymlink.h
	src/add-ons/kernel/file_systems/packagefs/PackageLinksDirectory.cpp
	src/add-ons/kernel/file_systems/packagefs/PackageNode.h
	src/add-ons/kernel/file_systems/packagefs/ResolvableFamily.cpp
	src/add-ons/kernel/file_systems/packagefs/Version.cpp
	src/add-ons/kernel/file_systems/packagefs/Version.h
	src/add-ons/kernel/file_systems/packagefs/Volume.cpp
	src/add-ons/kernel/file_systems/packagefs/Volume.h
	src/add-ons/kernel/file_systems/packagefs/kernel_interface.cpp
	src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c
	src/apps/deskbar/BarApp.cpp
	src/apps/deskbar/BarMenuBar.cpp
	src/apps/deskbar/BarMenuBar.h
	src/apps/deskbar/BarView.cpp
	src/apps/deskbar/BarView.h
	src/apps/deskbar/BarWindow.cpp
	src/apps/deskbar/BarWindow.h
	src/apps/deskbar/DeskbarMenu.cpp
	src/apps/deskbar/DeskbarMenu.h
	src/apps/deskbar/DeskbarUtils.cpp
	src/apps/deskbar/DeskbarUtils.h
	src/apps/deskbar/ExpandoMenuBar.cpp
	src/apps/deskbar/ExpandoMenuBar.h
	src/apps/deskbar/TeamMenu.cpp
	src/apps/processcontroller/ProcessController.cpp
	src/apps/remotedesktop/RemoteDesktop.cpp
	src/bin/bash/config-top.h
	src/bin/finddir.c
	src/bin/package/Jamfile
	src/bin/package/command_add.cpp
	src/bin/package/command_create.cpp
	src/bin/package/command_list.cpp
	src/bin/package_repo/command_list.cpp
	src/bin/pkgman/command_refresh.cpp
	src/build/libbe/support/Jamfile
	src/build/libpackage/Jamfile
	src/build/libroot/Jamfile
	src/build/libroot/fs.cpp
	src/build/libroot/remapped_functions.h
	src/kits/locale/MutableLocaleRoster.cpp
	src/kits/opengl/GLRendererRoster.cpp
	src/kits/package/PackageInfo.cpp
	src/kits/package/PackageInfoSet.cpp
	src/kits/package/PackageRoster.cpp
	src/kits/package/PackageVersion.cpp
	src/kits/package/RepositoryCache.cpp
	src/kits/package/hpkg/PackageWriterImpl.cpp
	src/kits/package/hpkg/ReaderImplBase.cpp
	src/kits/package/hpkg/WriterImplBase.cpp
	src/kits/print/PrintTransport.cpp
	src/kits/print/Printer.cpp
	src/kits/screensaver/ScreenSaverRunner.cpp
	src/kits/support/StringList.cpp
	src/kits/tracker/ContainerWindow.cpp
	src/kits/tracker/DeskWindow.cpp
	src/kits/tracker/PoseView.cpp
	src/libs/print/libprint/Transport.cpp
	src/preferences/printers/AddPrinterDialog.cpp
	src/preferences/screensaver/ScreenSaverWindow.cpp
	src/servers/debug/DebugServer.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/media_addon/MediaAddonServer.cpp
	src/system/boot/Jamfile
	src/system/boot/loader/Jamfile
	src/system/boot/loader/loader.cpp
	src/system/boot/loader/vfs.cpp
	src/system/kernel/fs/vfs.cpp
	src/system/kernel/fs/vfs_boot.cpp
	src/system/libroot/os/find_directory.cpp
	src/system/runtime_loader/runtime_loader.cpp
	src/tools/package/Jamfile
2013-05-05 15:03:26 +02:00
Oliver Tappe
e25f5f75e8 Update required version of legacy compiler in configure 2013-04-26 16:28:07 +02:00
Oliver Tappe
5c01289f68 Adjust configure script to changed compiler version 2013-04-21 23:22:19 +02:00
Jerome Duval
0837d6c650 GCC4 cross tools: builds with ppl and cloog when --use-gcc-graphite is given 2013-04-06 14:32:12 +02:00
Jerome Duval
ed38d2efcc Forgot to add the usage for --use-gcc-graphite 2013-04-06 14:07:24 +02:00
Jerome Duval
748c10f222 Added a configure option to activate Graphite compilations flags
* check if GCC actually supports Graphite flags when the option
  --use-gcc-graphite is used
2013-04-06 13:58:46 +02:00
Matt Madia
35f3908149 Use strip provided by the cross-tools.
This allows a 32-bit host to successfully build x86_64.
2013-01-04 12:42:26 +00:00
Alex Smith
11c9f9a1d6 Merge branch 'master' into x86_64
Conflicts:
	build/jam/FloppyBootImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	headers/private/shared/cpu_type.h
	src/bin/ps.c
	src/bin/sysinfo.cpp
	src/kits/tracker/PoseView.cpp
	src/preferences/appearance/DecorSettingsView.cpp
	src/preferences/virtualmemory/Settings.cpp
	src/servers/input/AddOnManager.cpp
	src/servers/input/InputServer.cpp
	src/servers/input/InputServerMethod.cpp
	src/system/boot/Jamfile
	src/system/boot/platform/raspberrypi_arm/mmu.cpp
	src/system/boot/platform/u-boot/arch/arm/Jamfile
	src/system/kernel/arch/x86/arch_cpu.cpp
	src/system/kernel/arch/x86/arch_thread.cpp
	src/system/kernel/cache/block_cache.cpp
	src/system/kernel/vm/VMAnonymousCache.cpp
2012-11-18 14:02:07 +00:00
Joseph R. Prostko
54295d081f Updated configure script due to GCC2 update
* The GCC2 buildtool sources were updated, so change the date
* A new GCC2 optional package will be added later today
+alpha 4 (build will break otherwise)
2012-10-31 23:33:20 -04:00
Joseph R. Prostko
4fa936c1dd Update required legacy GCC version 2012-10-12 21:13:52 -04:00
Alex Smith
4591ebc99a Fixes for building Haiku x86_64 from itself. 2012-08-18 19:57:46 +01:00
Alex Smith
aaeadfcb02 Do a separate libgcc build for the kernel as well.
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"`
2012-08-16 17:38:01 +01:00
Alex Smith
c864ba1a2d Build a separate libsupc++ for the kernel with correct flags.
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.
2012-08-16 13:57:04 +01:00
Alex Smith
b77772725c Changed x86_64 toolchain target to x86_64-unknown-haiku. 2012-08-01 11:46:44 +01:00
Alex Smith
bd16f0dd82 Fixed configure for legacy buildtools.
The elfedit tool doesn't exist with the old binutils, so configure was
failing when it tried to get the path to it. Only try to search for it
if building GCC 4.
2012-07-30 08:25:16 +01:00
Alex Smith
0efc5e72dc Merge branch 'master' into x86_64 2012-07-28 16:29:41 +01:00
Alex Smith
0d47dc5dd2 Fixed incorrect variable name in generated BuildConfig. 2012-07-28 16:26:07 +01:00
Alex Smith
385d69fc01 Made it possible to build kernel modules for x86_64.
Added the necessary build flags for modules, and added a module (dpc)
to the floppy image for x86_64 builds for testing purposes. The module
gets loaded correctly and its code runs without issue. Only non-trivial
addition is the different method for generating kernel.so, this is
explained in the kernel Jamfile.
2012-07-19 17:53:46 +01:00
Alex Smith
98614a9658 Merge branch 'master' into x86_64 2012-07-12 11:33:39 +01:00
Alex Smith
97f5a0bd35 Fixed case-sensitive filesystem check. 2012-07-11 17:41:52 +01:00
Alex Smith
fc644104ac Merge branch 'master' into x86_64 2012-07-11 12:24:47 +01:00
Alex Smith
0962132cc6 Fixed Mac OS X 10.7 as a build platform (for GCC 4).
* Use gcc and g++ rather than cc and c++, as the latter now point to
  clang with recent Xcode versions and compilation of the host tools
  fail for various reasons with it.
* Replace the case-sensitive filesystem check with a more basic one,
  as diskutil no longer supports the behaviour of getting info for the
  volume that any path is on.
* Updated ReadMe with a correct list of prerequisites for OS X.
* GCC 2 builds are still broken due to a strange error that only
  occurs with a GCC 2 built on OS X 10.7
2012-07-10 19:33:39 +01:00
Alex Smith
65ad1ba320 Made it possible to build the bootloader when targetting x86_64.
* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
  32-bit code. This adds a new set of rules for compiling boot code rather
  than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
  versions. These will be replaced later.
2012-05-26 21:47:27 +01:00
John Scipione
19d28b2205 Fix configure script to correctly detect case-sensitive file system 2012-03-05 23:13:13 -05:00
John Scipione
5e4d3774eb Change m86k to m68k in configure script. Fixes ticket #8239. 2011-12-15 01:22:04 -05:00
Oliver Tappe
c51014771d Adjust required legacy gcc version. 2011-11-22 19:00:22 +01:00
Ingo Weinhold
19ae20e67e Merge branch 'master' into pm-flat
Conflicts:
	build/jam/HaikuImage
	build/jam/OptionalBuildFeatures
	build/jam/OptionalPackages
	build/jam/UserBuildConfig.sample
	data/bin/installoptionalpackage
	src/apps/deskbar/DeskbarMenu.cpp
	src/servers/debug/DebugServer.cpp
	src/system/kernel/fs/vfs.cpp
2011-11-05 17:00:01 +01:00
Ingo Weinhold
bd291de302 Remove yasm check. Looks like I had accidentally (?) disabled the
version already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-03 14:27:39 +00:00
Ingo Weinhold
b55bd1da25 configure: Update required gcc 2 version 2011-07-17 17:09:23 +02:00
Oliver Tappe
3dfd9cb95c Flat commit of all changes from package-management branch in svn 2011-07-17 16:54:06 +02:00
Ingo Weinhold
25dc253d6a * Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 13:06:36 +00:00
Oliver Tappe
9a00115643 Last part of #3298:
* applied patch by VinDuv that adds a Perl-based implementation of readlink,
  which is needed on Mac OX X, as that doesn't have any of the other fallbacks
  - thanks!
IIRC, other people have managed to configure without this on Mac OS X, but
I suppose no harm can be done by providing this as last resort.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 16:17:36 +00:00
Axel Dörfler
f9bb7404fa * Updated the GCC2 package to version -100818. This will soon be needed to be
able to build Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38376 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 14:31:52 +00:00
Oliver Tappe
c3bcd1ce7c * remove references to timezone files, as those no longer exist
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 19:30:02 +00:00
Oliver Tappe
7a5c50f900 * updated optional package for gcc2 to gcc-2.95.3-x86-gcc2-2010-07-12
(a version that correctly deals with utf-8 chars in wide character literals)
* adjusted required gcc2 version in configure

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-12 19:32:24 +00:00
Ingo Weinhold
97901ec593 Patch by Nathan Mentley:
* Added a few header files in headers/posix/arch that'll allow for an x86_64
  haiku target to be compiled. fenv.h is src/lib/msun/amd64/fenv.h from
  freebsd.
* configure: Added support for x86_64 arch when running
  build_cross_tools_gcc4.
* config[_build]/HaikuConfig.h, BuildSetup: Added x86_64 recognition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 19:40:06 +00:00