mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 19:05:32 +00:00
hack: Support picking cc and cpp via environment variables.
Until now `cc' was hard-coded as the only compiler used. Supporting selecting the compiler and preprocessor to be used via environment variables makes life easier for distributors, so this commit mimics how podman does it in its hack/* scripts. Signed-off-by: Tomas Volf <~@wolfsden.cz>
This commit is contained in:
parent
2b6c7ad225
commit
60a609bec8
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
cc -E - > /dev/null 2> /dev/null << EOF
|
||||
${CPP:-${CC:-cc} -E} ${CPPFLAGS} - > /dev/null 2> /dev/null << EOF
|
||||
#include <btrfs/ioctl.h>
|
||||
EOF
|
||||
if test $? -ne 0 ; then
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
cc -E - > /dev/null 2> /dev/null << EOF
|
||||
${CPP:-${CC:-cc} -E} ${CPPFLAGS} - > /dev/null 2> /dev/null << EOF
|
||||
#include <btrfs/version.h>
|
||||
EOF
|
||||
if test $? -ne 0 ; then
|
||||
|
@ -5,7 +5,8 @@ fi
|
||||
tmpdir="$PWD/tmp.$RANDOM"
|
||||
mkdir -p "$tmpdir"
|
||||
trap 'rm -fr "$tmpdir"' EXIT
|
||||
cc -o "$tmpdir"/libsubid_tag -x c - -l subid > /dev/null 2> /dev/null << EOF
|
||||
${CC:-cc} ${CPPFLAGS} ${CFLAGS} -o "$tmpdir"/libsubid_tag -x c - -l subid \
|
||||
> /dev/null 2> /dev/null << EOF
|
||||
#include <shadow/subid.h>
|
||||
#include <stdlib.h>
|
||||
int main() {
|
||||
|
Loading…
Reference in New Issue
Block a user