Lenard Lindstrom committed e906374

Static link smpeg to libgcc and libstdc++

It is as simple as adding -static-libgcc to enironment variable CFLAGS.
CFLAGS is used when configure determines what libraries g++ chooses for

Comments (0)

Files changed (2)

-  # Don't need the toys.
+  # Don't need the toys. Disable dynamic linking of libgcc and libstdc++
   ./configure --disable-gtk-player --disable-opengl-player \
-              --prefix="$PREFIX"
+              --prefix="$PREFIX" CFLAGS="-static-libgcc $CFLAGS"
   # check for MSYS permission errors
   if [ x"`grep 'Permission denied' config.log`" != x ]; then
       echo '**** MSYS problems; build aborted.'
   cp -fp /mingw/lib/libmsvcr71.a "$DBMSVCR71/libmsvcrt.a"
   cp -fp /mingw/lib/libmsvcr71d.a "$DBMSVCR71/libmsvcrtd.a"
-if [ ! -f "$PREFIX/bin/libgcc_s_dw2-1.dll" ]; then
-  echo "Building libgcc_s_dw2-l.dll linked to msvcr71.dll."
-  pexports /mingw/bin/libgcc_s_dw2-1.dll >"$PREFIX/lib/libgcc.def"
-  gcc -shared -def "$PREFIX/lib/libgcc.def" \
-              /mingw/lib/gcc/mingw32/4.6.1/libgcc.a -mwindows -lkernel32 \
-              -o "$PREFIX/bin/libgcc_s_dw2-1.dll"
-if [ ! -f "$PREFIX/bin/libstdc++-6.dll" ]; then
-  echo "Building libstdc++.dll linked to msvcr71.dll."
-#   The linker does not like the '+' character in a library name.
-#   The fix: put the name in quotes.
-  pexports /mingw/bin/libstdc++-6.dll >"$PREFIX/lib/libstdc++.def_"
-  sed -e '1 s|\(LIBRARY  *\)\(..*\)|\1"\2"|' "$PREFIX/lib/libstdc++.def_" \
-      >"$PREFIX/lib/libstdc++.def"
-  rm "$PREFIX/lib/libstdc++.def_"
-  gcc -shared -shared-libgcc -def "$PREFIX/lib/libstdc++.def" \
-              /mingw/lib/gcc/mingw32/4.6.1/libstdc++.a -mwindows -lkernel32 \
-              -o "$PREFIX/bin/libstdc++-6.dll"
 alert = Preparation('computer beeper', r"""


 COPYLIB_swscale -lavutil -Lprebuilt/lib/swscale-0.dll
 COPYLIB_avcodec -lavutil -Lprebuilt/lib/avcodec-52.dll
 COPYLIB_avutil -Lprebuilt/lib/avutil-50.dll
-COPYLIB_gcc -Lprebuilt/lib/libgcc_s_dw2-1.dll
-COPYLIB_stdcpp -Lprebuilt/lib/libstdc++-6.dll
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.