Skip to content

Instantly share code, notes, and snippets.

@J5lx
Created January 8, 2017 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J5lx/771971b7560787f516436104c86ea658 to your computer and use it in GitHub Desktop.
Save J5lx/771971b7560787f516436104c86ea658 to your computer and use it in GitHub Desktop.
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
echo Linking exepath/freepascalsimpleapp
OFS=$IFS
IFS="
"
/usr/bin/ld -b elf64-x86-64 -m elf_x86_64 -s -L. -o exepath/freepascalsimpleapp exepath/link.res
if [ $? != 0 ]; then DoExitLink exepath/freepascalsimpleapp; fi
IFS=$OFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment