strip_fPIC.sh
author Sam Lantinga <slouken@libsdl.org>
Mon, 30 Jan 2006 13:30:44 +0000
changeset 1296 f418917e0b7a
parent 22 48c34d68918e
permissions -rwxr-xr-x
Fixed crash:
#include <SDL.h>

int main(int argc, char** argv)
{
SDL_Init(SDL_INIT_EVERYTHING);
SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN);
SDL_ShowCursor(SDL_DISABLE);
SDL_Delay(1000);
SDL_SetVideoMode(640, 480, 0, SDL_FULLSCREEN | SDL_OPENGL);
SDL_Quit();
printf("Everything okay\n");
}
     1 #!/bin/sh
     2 #
     3 # libtool assumes that the compiler can handle the -fPIC flag
     4 # This isn't always true (for example, nasm can't handle it)
     5 command=""
     6 while [ $# -gt 0 ]; do
     7     case "$1" in
     8         -?PIC)
     9             # Ignore -fPIC and -DPIC options
    10             ;;
    11         *)
    12             command="$command $1"
    13             ;;
    14     esac
    15     shift
    16 done
    17 echo $command
    18 exec $command