mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-25 10:41:52 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			841 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			841 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| cd "`dirname "$0"`/.."
 | |
| FPC_SRC_DIR="$PWD"
 | |
| COMP_DIR="$FPC_SRC_DIR/compiler"
 | |
| RTL_DIR="$FPC_SRC_DIR/rtl"
 | |
| SPARC_BINUTILS_DIR="/usr/local/bin/sparc-linux"
 | |
| INCLUDE_PATH=`echo -Fi"$RTL_DIR/"{unix,linux,sparc,inc,linux/sparc}`
 | |
| SRC_DIR=`echo "$COMP_DIR/"{,sparc,systems}:`
 | |
| TEST_DIR="-FE$FPC_SRC_DIR/tests/sparc"
 | |
| if [[ "$1" == "-B" ]] || [[ "$#" == 0 ]]
 | |
| then
 | |
|   cd "$COMP_DIR"
 | |
|   fpc pp -gl -oppcsparc -dExtDebug -Fu"sparc;systems" -FE"sparc" -dSPARC -dNoOpt -dGDB "$1"
 | |
| fi
 | |
| if [[ "$#" -gt "0" ]] && ( [[ "$1" != "-B" ]] || [[ "$#" -gt "1" ]] )
 | |
| then
 | |
|   cd "$FPC_SRC_DIR/tests/sparc"
 | |
|   if [[ "$1" == "-gdb" ]]
 | |
|   then
 | |
|     shift 1
 | |
|     gdb -d "$SRC_DIR" --args "$COMP_DIR/sparc/ppcsparc" -s -al $INCLUDE_PATH $TEST_DIR -dSPARC "$@"
 | |
|   else
 | |
|     "$COMP_DIR/sparc/ppcsparc" -s -al -FD"$SPARC_BINUTILS_DIR" $INCLUDE_PATH  $TEST_DIR -dSPARC "$@"
 | |
|   fi
 | |
| fi
 | 
