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.
This commit is contained in:
parent
a5c952db0d
commit
fc2c93fbec
@ -1,16 +1,16 @@
|
|||||||
Building Haiku
|
Building Haiku
|
||||||
==========================
|
==========================
|
||||||
This is a overview into the process of building HAIKU from source.
|
This is a overview into the process of building HAIKU from source.
|
||||||
An online version is available at <https://haiku-os.org/guides/building/>.
|
An online version is available at <https://www.haiku-os.org/guides/building/>.
|
||||||
|
|
||||||
Official releases of Haiku are at <https://haiku-os.org/get-haiku>.
|
Official releases of Haiku are at <https://www.haiku-os.org/get-haiku>.
|
||||||
The (unstable) nightly builds are available at <https://download.haiku-os.org/>.
|
The (unstable) nightly builds are available at <https://download.haiku-os.org/>.
|
||||||
|
|
||||||
We currently support the following platforms:
|
We currently support the following platforms:
|
||||||
* Haiku
|
* Haiku
|
||||||
* Linux
|
* Linux
|
||||||
* FreeBSD
|
* FreeBSD
|
||||||
* Mac OS X
|
* macOS
|
||||||
|
|
||||||
Required Software
|
Required Software
|
||||||
----------------------------
|
----------------------------
|
||||||
@ -20,18 +20,17 @@ Tools provided within Haiku's repositories:
|
|||||||
|
|
||||||
The tools to compile Haiku will vary, depending on the platform that you are
|
The tools to compile Haiku will vary, depending on the platform that you are
|
||||||
using to build Haiku. When building from Haiku, all of the necessary
|
using to build Haiku. When building from Haiku, all of the necessary
|
||||||
development tools are included in official releases (e.g. R1 alpha4) and in the
|
development tools are included in official releases (e.g. R1/alpha4) and in the
|
||||||
nightly builds.
|
nightly builds.
|
||||||
|
|
||||||
* `git`
|
* `git`
|
||||||
* `ssh` (for developers with commit access)
|
|
||||||
* `gcc`/`g++` and binutils (`as`, `ld`, etc., required by GCC)
|
* `gcc`/`g++` and binutils (`as`, `ld`, etc., required by GCC)
|
||||||
* (GNU) `make`
|
* (GNU) `make`
|
||||||
* `bison` (2.4 or better)
|
* `bison` (2.4 or better)
|
||||||
* `flex` and `lex` (usually a mini shell script invoking `flex`)
|
* `flex` and `lex` (usually a mini shell script invoking `flex`)
|
||||||
* `makeinfo` (part of `texinfo`, only needed for building GCC 4)
|
* `makeinfo` (part of `texinfo`, only needed for building GCC 4)
|
||||||
* `autoheader` (part of `autoconf`, needed for building GCC)
|
* `autoheader` (part of `autoconf`, needed for building GCC)
|
||||||
* `automake`
|
* `automake` (needed for building GCC)
|
||||||
* `gawk`
|
* `gawk`
|
||||||
* `nasm`
|
* `nasm`
|
||||||
* `wget`
|
* `wget`
|
||||||
@ -52,7 +51,7 @@ If you want to compile Haiku for ARM, you will also need:
|
|||||||
* `mkimage` (<http://www.denx.de/wiki/U-Boot/WebHome>)
|
* `mkimage` (<http://www.denx.de/wiki/U-Boot/WebHome>)
|
||||||
* Mtools (<https://gnu.org/software/mtools/intro.html>)
|
* Mtools (<https://gnu.org/software/mtools/intro.html>)
|
||||||
|
|
||||||
### On Mac OS X
|
### On macOS
|
||||||
|
|
||||||
Disk Utility can create a case-sensitive disk image of at least 3 GiB in size.
|
Disk Utility can create a case-sensitive disk image of at least 3 GiB in size.
|
||||||
The following ports need to be installed:
|
The following ports need to be installed:
|
||||||
@ -119,32 +118,38 @@ update the source tree very frequently, you may want to execute `configure`
|
|||||||
after each update just to be on the safe side.
|
after each update just to be on the safe side.
|
||||||
|
|
||||||
Depending on your goal, there are several different ways to configure Haiku.
|
Depending on your goal, there are several different ways to configure Haiku.
|
||||||
You can either call configure from within your Haiku trunk folder. That will
|
The first way is to call configure from within your Haiku checkout's root. That
|
||||||
prepare a folder named 'generated', which will contain the compiled objects.
|
will prepare a folder named 'generated', which will contain the compiled objects.
|
||||||
Another option is to manually created one or more `generated.*` folders and run
|
Another option is to manually created one or more `generated.*` folders and run
|
||||||
configure from within them. For example, imagine the following directory setup:
|
configure from within them. For example, imagine the following directory setup:
|
||||||
```
|
```
|
||||||
buildtools-trunk/
|
buildtools/
|
||||||
haiku-trunk/
|
haiku/
|
||||||
haiku-trunk/generated.x86gcc2
|
haiku/generated.x86gcc2
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure a GCC 2.95 Hybrid, from a non-Haiku platform
|
### Configure a GCC 2.95/GCC 5 Hybrid, from a non-Haiku platform
|
||||||
```bash
|
```bash
|
||||||
cd haiku-trunk/generated.x86gcc2
|
cd haiku/generated.x86gcc2
|
||||||
../configure --use-xattr-ref \
|
../configure \
|
||||||
--build-cross-tools x86_gcc2 ../../buildtools/ \
|
--build-cross-tools x86_gcc2 ../../buildtools/ \
|
||||||
--build-cross-tools x86
|
--build-cross-tools x86
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure a GCC 2.95 Hybrid, from Haiku
|
### Configure an x86_64 (GCC 5) build, from a non-Haiku platform
|
||||||
```
|
```
|
||||||
cd haiku-trunk/generated.x86gcc2
|
cd haiku/generated.x86_64
|
||||||
|
../configure --build-cross-tools x86_64 ../../buildtools/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure a GCC 2.95/GCC 5 Hybrid, from Haiku
|
||||||
|
```
|
||||||
|
cd haiku/generated.x86gcc2
|
||||||
../configure --target-arch x86_gcc2 --target-arch x86
|
../configure --target-arch x86_gcc2 --target-arch x86
|
||||||
```
|
```
|
||||||
|
|
||||||
Additional information about GCC Hybrids can be found on the website,
|
Additional information about GCC Hybrids can be found on the website,
|
||||||
<https://haiku-os.org/guides/building/gcc-hybrid>.
|
<https://www.haiku-os.org/guides/building/gcc-hybrid>.
|
||||||
|
|
||||||
### Configure options
|
### Configure options
|
||||||
The various runtime options for configure are documented in its onscreen help
|
The various runtime options for configure are documented in its onscreen help
|
||||||
@ -231,7 +236,7 @@ BootManager
|
|||||||
```
|
```
|
||||||
|
|
||||||
### On Emulated Hardware
|
### On Emulated Hardware
|
||||||
For emulated hardware you should build disk image (see above). How to set up
|
For emulated hardware you should build a disk image (see above). How to set up
|
||||||
this image depends on your emulator. If you use QEMU, you can usually just
|
this image depends on your emulator. If you use QEMU, you can usually just
|
||||||
provide the path to the image as command line argument to the `qemu`
|
provide the path to the image as command line argument to the `qemu`
|
||||||
executable.
|
executable.
|
||||||
|
47
configure
vendored
47
configure
vendored
@ -90,12 +90,13 @@ options:
|
|||||||
--use-gcc-graphite Build with GCC Graphite engine for loop
|
--use-gcc-graphite Build with GCC Graphite engine for loop
|
||||||
optimizations. (Only for GCC 4+.)
|
optimizations. (Only for GCC 4+.)
|
||||||
--use-32bit Use -m32 flag on 64bit host gcc compiler.
|
--use-32bit Use -m32 flag on 64bit host gcc compiler.
|
||||||
--use-xattr Use Linux/*BSD's native extended file attributes
|
--no-full-xattr Do not use Linux/*BSD/Darwin's native extended file
|
||||||
for Haiku extended attributes.
|
attributes as Haiku attributes. If they are still
|
||||||
--use-xattr-ref Use the generic Haiku attribute emulation, but use
|
available, they will be used to store hashes for
|
||||||
Linux/*BSD's native extended attributes to make it
|
the attribute emulation layer.
|
||||||
more robust (i.e. attribute mix-ups become
|
--no-xattr Do not use Linux/*BSD/Darwin's native extended file
|
||||||
less likely.)
|
attributes for Haiku extended attributes at all,
|
||||||
|
even if they are available.
|
||||||
--with-gdb <gdb sources dir>
|
--with-gdb <gdb sources dir>
|
||||||
specify the path to a GDB source dir, to build
|
specify the path to a GDB source dir, to build
|
||||||
GDB for each arch we build the cross-tools for.
|
GDB for each arch we build the cross-tools for.
|
||||||
@ -515,8 +516,8 @@ HAIKU_DISTRO_COMPATIBILITY=default
|
|||||||
TARGET_PLATFORM=haiku
|
TARGET_PLATFORM=haiku
|
||||||
HAIKU_USE_GCC_PIPE=0
|
HAIKU_USE_GCC_PIPE=0
|
||||||
HAIKU_HOST_USE_32BIT=0
|
HAIKU_HOST_USE_32BIT=0
|
||||||
HAIKU_HOST_USE_XATTR=0
|
HAIKU_HOST_USE_XATTR=
|
||||||
HAIKU_HOST_USE_XATTR_REF=0
|
HAIKU_HOST_USE_XATTR_REF=
|
||||||
HAIKU_HOST_BUILD_ONLY=0
|
HAIKU_HOST_BUILD_ONLY=0
|
||||||
HOST_EXTENDED_REGEX_SED="sed -r"
|
HOST_EXTENDED_REGEX_SED="sed -r"
|
||||||
HOST_GCC_LD=`$CC -print-prog-name=ld`
|
HOST_GCC_LD=`$CC -print-prog-name=ld`
|
||||||
@ -583,7 +584,9 @@ if [ "$1" = "--update" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd $lastPwd
|
cd $lastPwd
|
||||||
export $lastEnv
|
if [ -n "$lastEnv" ]; then
|
||||||
|
export $lastEnv
|
||||||
|
fi
|
||||||
$lastConfig $lastArgs
|
$lastConfig $lastArgs
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
@ -706,8 +709,8 @@ while [ $# -gt 0 ] ; do
|
|||||||
--use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;;
|
--use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;;
|
||||||
--use-gcc-graphite) useGccGraphiteDefault=1; shift 1;;
|
--use-gcc-graphite) useGccGraphiteDefault=1; shift 1;;
|
||||||
--use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;;
|
--use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;;
|
||||||
--use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;;
|
--no-full-xattr)HAIKU_HOST_USE_XATTR=0; shift 1;;
|
||||||
--use-xattr-ref) HAIKU_HOST_USE_XATTR_REF=1; shift 1;;
|
--no-xattr) HAIKU_HOST_USE_XATTR_REF=0; shift 1;;
|
||||||
--with-gdb) gdbSources=$2; shift 2;;
|
--with-gdb) gdbSources=$2; shift 2;;
|
||||||
*) echo Invalid argument: \`$1\'; exit 1;;
|
*) echo Invalid argument: \`$1\'; exit 1;;
|
||||||
esac
|
esac
|
||||||
@ -744,27 +747,17 @@ if [ $caseInsensitive != 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check xattr support
|
# check xattr support
|
||||||
if [ $HOST_PLATFORM != "haiku_host" ] && [ $HAIKU_HOST_USE_XATTR != 0 ] \
|
if [ $HOST_PLATFORM != "haiku_host" ] && [ -z $HAIKU_HOST_USE_XATTR_REF ]; then
|
||||||
|| [ $HAIKU_HOST_USE_XATTR_REF != 0 ]; then
|
|
||||||
if [ $HAIKU_HOST_USE_XATTR != 0 ] && [ $HAIKU_HOST_USE_XATTR_REF != 0 ]; then
|
|
||||||
echo "$0: error: both --use-xattr and --use-xattr-ref cannot be specified."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
check_native_xattrs
|
check_native_xattrs
|
||||||
attrSupport=$?
|
attrSupport=$?
|
||||||
if [ $attrSupport = 2 ]; then
|
if [ $attrSupport = 2 ] && [ -z $HAIKU_HOST_USE_XATTR ]; then
|
||||||
0; # all is well, we don't need to do anything
|
HAIKU_HOST_USE_XATTR=1
|
||||||
elif [ $attrSupport = 1 ]; then
|
elif [ $attrSupport = 1 ]; then
|
||||||
if [ $HAIKU_HOST_USE_XATTR != 0 ]; then
|
HAIKU_HOST_USE_XATTR_REF=1
|
||||||
echo "$0: error: full extended attributes requested but host" \
|
|
||||||
"only has support for xattr-ref."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$0: error: host platform has no support for extended attributes."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ -z $HAIKU_HOST_USE_XATTR ]; then HAIKU_HOST_USE_XATTR=0; fi
|
||||||
|
if [ -z $HAIKU_HOST_USE_XATTR_REF ]; then HAIKU_HOST_USE_XATTR_REF=0; fi
|
||||||
|
|
||||||
# determine how to invoke sed with extended regexp support for non-GNU sed
|
# determine how to invoke sed with extended regexp support for non-GNU sed
|
||||||
if [ $HOST_PLATFORM = "darwin" ]; then
|
if [ $HOST_PLATFORM = "darwin" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user