From a6d27c3bca9e9ed591ae4a6e90666a027dcef2b0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 Oct 2019 10:31:19 +0200 Subject: Pass compiler mode as part of config.{c,cxx} in environment scripts --- doc/manual.cli | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'doc/manual.cli') diff --git a/doc/manual.cli b/doc/manual.cli index 4cae4c8..d2457da 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -818,13 +818,13 @@ For details on configuring and testing installation refer to \l{#arch-controller Controller Logic}. As an example, the following POSIX shell script can be used to setup the -environment for building C and C++ packages with GCC 6 on most Linux +environment for building C and C++ packages with GCC 9 on most Linux distributions. \ #!/bin/sh -# Environment setup script for C/C++ compilation with GCC 6. +# Environment setup script for C/C++ compilation with GCC 9. # # $1 - target # $2 - bbot executable @@ -832,15 +832,22 @@ distributions. set -e # Exit on errors. -t=\"$1\" +mode= +case \"$1\" in + x86_64-*) + #mode=-m64 + ;; + i?86-*) + mode=-m32 + ;; + *) + echo \"unknown target: '$1'\" 1>&2 + exit 1 + ;; +esac shift -if test -n \"$t\"; then - echo \"unknown target: $t\" 1>&2 - exit 1 -fi - -exec \"$@\" cc config.c=gcc-6 config.cxx=g++-6 +exec \"$@\" cc config.c=\"gcc-9 $mode\" config.cxx=\"g++-9 $mode\" \ \h#arch-controller|Controller Logic| -- cgit v1.1