summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2017-01-04 21:56:35 +0100
committerChristian Pointner <equinox@anytun.org>2017-01-04 21:56:35 +0100
commit9b3f13c0521d846d89fd0bd0c69e74d17fddbc71 (patch)
tree027c8a5d550e16ba43ccbca527e6bd4dab76852d
parentupdated copyright header (diff)
improve build reproducibility
-rwxr-xr-xsrc/configure14
-rw-r--r--src/options.c8
2 files changed, 9 insertions, 13 deletions
diff --git a/src/configure b/src/configure
index 636a0c4..bd0cbaf 100755
--- a/src/configure
+++ b/src/configure
@@ -153,12 +153,12 @@ if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then
fi
if [ $USE_CLANG -eq 0 ]; then
- CFLAGS='-g -Wall -O2'
- LDFLAGS='-g -Wall -O2'
+ CFLAGS=$CFLAGS'-g -Wall -O2'
+ LDFLAGS=$LDFLAGS'-g -Wall -O2'
COMPILER='gcc'
else
- CFLAGS='-g -O2'
- LDFLAGS='-g -O2'
+ CFLAGS=$CFLAGS'-g -O2'
+ LDFLAGS=$LDFLAGS'-g -O2'
COMPILER='clang'
fi
@@ -270,9 +270,6 @@ if which git >/dev/null; then
fi
fi
-HOSTNAME=`hostname`
-DATE=`date +"%d.%m.%Y %H:%M:%S %Z"`
-
cat > version.h <<EOF
/*
* uanytun version info
@@ -285,8 +282,7 @@ cat > version.h <<EOF
#ifndef UANYTUN_version_h_INCLUDED
#define UANYTUN_version_h_INCLUDED
-#define VERSION_STRING_0 "uanytun version $VERSION"
-#define VERSION_STRING_1 "built on $HOSTNAME, $DATE"
+#define VERSION_STRING "uanytun version $VERSION"
#endif
diff --git a/src/options.c b/src/options.c
index a70b39e..d564d39 100644
--- a/src/options.c
+++ b/src/options.c
@@ -483,13 +483,13 @@ void options_print_usage()
void options_print_version()
{
- printf("%s\n", VERSION_STRING_0);
+ printf("%s\n", VERSION_STRING);
#if defined(__clang__)
- printf("%s, using CLANG %s\n", VERSION_STRING_1, __clang_version__);
+ printf("built using CLANG %s\n", __clang_version__);
#elif defined(__GNUC__)
- printf("%s, using GCC %d.%d.%d\n", VERSION_STRING_1, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
+ printf("built using GCC %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#else
- printf("%s\n", VERSION_STRING_1);
+ printf("built using an unknown compiler\n");
#endif
}