Skip to content

Commit

Permalink
Add static-libstdc++ flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
nick8325 committed Sep 15, 2017
1 parent 239127f commit aef4d29
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
24 changes: 24 additions & 0 deletions gcc-static-libstdc++
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/zsh
typeset -a args

process() {
for arg in $*; do
case $arg in
\"*\")
process $(echo $arg | cut -c2- | rev | cut -c2- | rev)
;;
@*)
process $(cat $(echo $arg | cut -c2-))
;;
-lstdc++ | -fuse-ld=gold)
;;
*)
args+=$arg
;;
esac
done
}

process $*

exec g++ -static-libgcc -static-libstdc++ $args
9 changes: 8 additions & 1 deletion jukebox.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ Description:
encoding types) and clausify problems (both typed and untyped).
License: BSD3
License-file: LICENSE
extra-source-files: src/errors.h
extra-source-files: src/errors.h gcc-static-libstdc++

flag minisat
Description: Use minisat. Required for monotonicity inference.
Default: True

flag static-cxx
description: Build a binary which statically links against libstdc++.
default: False

source-repository head
type: git
location: https://github.com/nick8325/jukebox
Expand Down Expand Up @@ -72,3 +76,6 @@ Executable jukebox
Main-is: executable/Main.hs
Build-depends: base >= 4 && < 5, jukebox
ghc-options: -W -fno-warn-incomplete-patterns

if flag(static-cxx)
ghc-options: -pgml ./gcc-static-libstdc++

0 comments on commit aef4d29

Please sign in to comment.