Skip to content

Commit

Permalink
Add -no-pie in several faust2xx scripts on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 11, 2019
1 parent 431d229 commit e44a4ee
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
8 changes: 6 additions & 2 deletions tools/faust2appls/faust2alqt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################################################
# #
# Compiles Faust programs to alsa-qt #
# (c) Grame, 2009 #
# (c) Grame, 2009-2019 #
# #
#####################################################################

Expand All @@ -15,6 +15,10 @@ CXXFLAGS=$MYGCCFLAGS
ARCHFILE=$FAUSTARCH/alsa-qt.cpp
ARCHLIB="-lasound"

if [[ $(uname -s) != Darwin ]]; then
LFLAGS+="-no-pie"
fi

#-------------------------------------------------------------------------------
# Search for qmake or qmake-qt4

Expand Down Expand Up @@ -111,7 +115,7 @@ for p in $FILES; do
# compile c++ to binary
(
cd "$TMP"
$QMAKE -project "QT += widgets printsupport network" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC" "QMAKE_CXXFLAGS=$CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "LIBS+=$ARCHLIB $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+= $FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS"
$QMAKE -project "QT += widgets printsupport network" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC" "QMAKE_CXXFLAGS=$CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "QMAKE_LFLAGS=$LFLAGS" "LIBS+=$ARCHLIB $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+= $FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS"
$QMAKE $SPEC QMAKE_CFLAGS_ISYSTEM=-I
make
) > /dev/null || exit
Expand Down
8 changes: 6 additions & 2 deletions tools/faust2appls/faust2alsa
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################################################
# #
# Compiles Faust programs to alsa-gtk #
# (c) Grame, 2009-2013 #
# (c) Grame, 2009-2019 #
# #
#####################################################################

Expand All @@ -15,6 +15,10 @@ CXXFLAGS=$MYGCCFLAGS
ARCHFILE=$FAUSTARCH/alsa-gtk.cpp
OSCDEFS=""

if [[ $(uname -s) != Darwin ]]; then
LFLAGS+="-no-pie"
fi

#-------------------------------------------------------------------
# Analyze command arguments :
# faust options -> OPTIONS
Expand Down Expand Up @@ -85,7 +89,7 @@ for f in $FILES; do

# compile c++ to binary
(
$CXX $CXXFLAGS $FAUSTTOOLSFLAGS $OMP "$f.cpp" `pkg-config --cflags --libs alsa gtk+-2.0` $PROCARCH $YPATH $OSCDEFS $HTTPDEFS $POLYDEFS $MIDIDEFS -o "${f%.dsp}"
$CXX $CXXFLAGS $FAUSTTOOLSFLAGS $OMP "$f.cpp" `pkg-config --cflags --libs alsa gtk+-2.0` $PROCARCH $YPATH $OSCDEFS $HTTPDEFS $POLYDEFS $MIDIDEFS $LFLAGS -o "${f%.dsp}"
)> /dev/null || exit
rm "$f.cpp"

Expand Down
10 changes: 7 additions & 3 deletions tools/faust2appls/faust2jack
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################################################
# #
# Compiles Faust programs to JACK-GTK #
# (c) Grame, 2009-2018 #
# (c) Grame, 2009-2019 #
# #
#####################################################################

Expand All @@ -21,6 +21,10 @@ SOUNDFILE="0"
SOUNDFILEDEFS=""
SOUNDFILELIBS=""

if [[ $(uname -s) != Darwin ]]; then
LFLAGS+="-no-pie"
fi

#-------------------------------------------------------------------
# Check Darwin specifics
#
Expand Down Expand Up @@ -131,10 +135,10 @@ EndOfCode

# compile c++ to binary
(
$CXX $CXXFLAGS $FAUSTTOOLSFLAGS $OMP "$f.cpp" `pkg-config --cflags --libs jack $OCVLIBS gtk+-2.0` $SOUNDFILELIBS $SAMPLERATELIBS $PROCARCH $OSCDEFS $HTTPDEFS $OCVDEFS $MIDIDEFS $POLYDEFS $SOUNDFILEDEFS $SAMPLERATEDEFS $ARCHLIB -o "${f%.dsp}"
$CXX $CXXFLAGS $FAUSTTOOLSFLAGS $OMP "$f.cpp" `pkg-config --cflags --libs jack $OCVLIBS gtk+-2.0` $SOUNDFILELIBS $SAMPLERATELIBS $PROCARCH $OSCDEFS $HTTPDEFS $OCVDEFS $MIDIDEFS $POLYDEFS $SOUNDFILEDEFS $SAMPLERATEDEFS $ARCHLIB $LFLAGS -o "${f%.dsp}"
) > /dev/null || exit

# remove tempory stuff
# remove tempory files
rm -f "$f.cpp" effect.h "$f.json"

# collect binary file name for FaustWorks
Expand Down
10 changes: 7 additions & 3 deletions tools/faust2appls/faust2jaqt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################################################
# #
# Compiles Faust programs to JACK-QT #
# (c) Grame, 2009-2018 #
# (c) Grame, 2009-2019 #
# #
#####################################################################

Expand All @@ -14,6 +14,10 @@ CXXFLAGS=$MYGCCFLAGS

ARCHFILE=$FAUSTARCH/jack-qt.cpp

if [[ $(uname -s) != Darwin ]]; then
LFLAGS+="-no-pie"
fi

#-------------------------------------------------------------------
# Set Faust include path

Expand Down Expand Up @@ -174,7 +178,7 @@ EndOfCode
# compile c++ to binary
(
cd "$TMP"
$QMAKE -project "QT += widgets printsupport network" "CONFIG+=warn_off" "$CLANGOPT" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC /opt/local/include" "QMAKE_CXXFLAGS=$CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "LIBS+=$ARCHLIB $SOUNDFILELIBS $SAMPLERATELIBS $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+= $FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS" "$SOUNDFILEDEFS" "$SAMPLERATEDEFS"
$QMAKE -project "QT += widgets printsupport network" "CONFIG+=warn_off" "$CLANGOPT" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC /opt/local/include" "QMAKE_CXXFLAGS=$CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "QMAKE_LFLAGS=$LFLAGS" "LIBS+=$ARCHLIB $SOUNDFILELIBS $SAMPLERATELIBS $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+= $FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS" "$SOUNDFILEDEFS" "$SAMPLERATEDEFS"
$QMAKE $SPEC QMAKE_CFLAGS_ISYSTEM=-I
make
) > /dev/null || exit
Expand Down Expand Up @@ -224,7 +228,7 @@ EndOfCode
fi
fi

#remove tempory stuff
#remove tempory files
rm -rf "$SRCDIR/${f%.dsp}$EXT"
cp -r "$TMP/${f%.dsp}$EXT" "$SRCDIR/${f%.dsp}$EXT"
rm -rf "$TDR"
Expand Down
8 changes: 6 additions & 2 deletions tools/faust2appls/faust2paqt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#####################################################################
# #
# Compiles Faust programs to PortAudio and QT #
# (c) Grame, 2009 #
# (c) Grame, 2009-2019 #
# #
#####################################################################

Expand All @@ -14,6 +14,10 @@ CXXFLAGS=$MYGCCFLAGS

ARCHFILE=$FAUSTARCH/pa-qt.cpp

if [[ $(uname -s) != Darwin ]]; then
LFLAGS+="-no-pie"
fi

#-------------------------------------------------------------------------------
# Search for qmake or qmake-qt4

Expand Down Expand Up @@ -136,7 +140,7 @@ EndOfCode
# compile c++ to binary
(
cd "$TMP"
$QMAKE -project "QT += widgets printsupport" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC /opt/local/include" "QMAKE_CXXFLAGS= $CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "QMAKE_INFO_PLIST=$FAUSTARCH/Info.plist" "LIBS+=$ARCHLIB $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+=$FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS"
$QMAKE -project "QT += widgets printsupport" "INCLUDEPATH+=$CUR" "INCLUDEPATH+=$FAUSTINC /opt/local/include" "QMAKE_CXXFLAGS= $CXXFLAGS -Wno-unused-parameter $FAUSTTOOLSFLAGS" "QMAKE_INFO_PLIST=$FAUSTARCH/Info.plist" "QMAKE_LFLAGS=$LFLAGS" "LIBS+=$ARCHLIB $OSCLIBS $HTTPLIBS" "HEADERS+=$FAUSTINC/faust/gui/QTUI.h" "RESOURCES+=$FAUSTINC/faust/gui/Styles/Grey.qrc" "$OSCDEFS" "$HTTPDEFS" "$QRDEFS" "$POLYDEFS" "$MIDIDEFS"
$QMAKE $SPEC QMAKE_CFLAGS_ISYSTEM=-I
make
) > /dev/null || exit
Expand Down

0 comments on commit e44a4ee

Please sign in to comment.