File: faustoptflags

package info (click to toggle)
faust 2.81.10%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 431,496 kB
  • sloc: cpp: 283,941; ansic: 116,215; javascript: 18,529; sh: 14,356; vhdl: 14,052; java: 5,900; python: 5,091; objc: 3,852; makefile: 2,725; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 111; tcl: 26
file content (53 lines) | stat: -rw-r--r-- 1,845 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash

#####################################################################
#                                                                   #
#               Defines the best optimisation flags to use          #
#               on the various platforms. This file is called       #
#               by the faust2xxx scripts. It sets two variables     #
#               $MYGCCFLAGS and $MYICCFLAGS                         #
#               (c) Grame, 2013                                     #
#                                                                   #
#####################################################################

#-------------------------------------------------------------------
# Default compilation flags for gcc and icc :
#
if [ "$(uname -m)" = armv6l ]; then        # for Raspberry PI
    MYGCCFLAGS="-std=c++14 -O3 -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -ffast-math -ftree-vectorize"
elif [ "$(uname -s)" = Darwin ]; then      # for macOS
    if [[ $(sysctl -n machdep.cpu.brand_string) =~ "Apple" ]]; then
        # Silicon MX
        MYGCCFLAGS="-std=c++14 -Ofast"
    else
        # Intel
        MYGCCFLAGS="-std=c++14 -Ofast -march=native"
    fi
    MYGCCFLAGSGENERIC="-std=c++14 -Ofast"
else                                        # for Linux (Intel)
    MYGCCFLAGS="-std=c++14 -Ofast -march=native"
    MYGCCFLAGSGENERIC="-std=c++14 -Ofast"
fi

# For Linux (intel) with icc
MYICCFLAGS="-std=c++14 -O3 -xHost -ftz -fno-alias -fp-model fast=2"

# Default compilers

# Set default value for CXX
: ${CXX:=c++}

# Set default value for CC
: ${CC:=cc}

# For universal binaries creation on maxOS
LIPO=lipo

# For use with template-llvm.cpp
if [ "$(uname)" = "Darwin" ]; then
    STRIP=-dead_strip
else
    #STRIP=-strip (does not seem to work...)
    STRIP=
fi