Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 4 | exec "meson.real" "$@" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | fi |
| 6 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7 | if [ -z "$SSL_CERT_DIR" ]; then |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 8 | export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/etc/ssl/certs/" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 9 | fi |
| 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | # If these are set to a cross-compile path, meson will get confused and try to |
| 12 | # use them as native tools. Unset them to prevent this, as all the cross-compile |
| 13 | # config is already in meson.cross. |
| 14 | unset CC CXX CPP LD AR NM STRIP |
| 15 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 16 | for arg in "$@"; do |
| 17 | case "$arg" in |
| 18 | -*) continue ;; |
| 19 | *) SUBCMD="$arg"; break ;; |
| 20 | esac |
| 21 | done |
| 22 | |
| 23 | if [ "$SUBCMD" = "setup" ] || [ -d "$SUBCMD" ]; then |
| 24 | MESON_SUB_OPTS=" \ |
| 25 | --cross-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/${TARGET_PREFIX}meson.cross" \ |
| 26 | --native-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.native" \ |
| 27 | " |
| 28 | fi |
| 29 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame^] | 31 | "$@" \ |
| 32 | $MESON_SUB_OPTS |