== Cross Bootstrap


=== Install dependencies
```
pacman -Sy ${TARGET_CHOST}-pacman
pacman-${TARGET_CARCH}
pacman-${TARGET_CARCH} -Sy libxcrypt --overwrite=/*
pacman-${TARGET_CARCH} -Sy alsa-lib cups giflib libjpeg-turbo libxrender libxrandr libxtst libxt lcms2
```

=== Configure
```
source /etc/makepkg-${TARGET_CARCH}.conf
bash configure --openjdk-target=${TARGET_CHOST} \
    --with-version-pre="" \
    --with-version-opt="" \
    --with-stdc++lib=dynamic \
    --with-extra-cflags="${CFLAGS}" \
    --with-extra-cxxflags="${CXXFLAGS}" \
    --with-extra-ldflags="${LDFLAGS}" \
    --with-libjpeg=system \
    --with-giflib=system \
    --with-libpng=system \
    --with-lcms=system \
    --with-zlib=system \
    --with-harfbuzz=system \
    --with-native-debug-symbols=internal \
    --enable-unlimited-crypto \
    --disable-warnings-as-errors \
    --with-jvm-variants=(server|zero)
```

=== Basic test in exploded JDK image
```
cd jdk17../build/linux-*/images/jdk
JAVA_HOME=$(pwd) ./bin/java -version
```
