mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 08:31:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			668 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			668 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| cd "`dirname "$0"`/.."
 | |
| FPC_SRC_DIR="$PWD"
 | |
| COMP_DIR="$FPC_SRC_DIR/compiler"
 | |
| RTL_DIR="$FPC_SRC_DIR/rtl"
 | |
| if [[ "$1" == "-B" ]] || [[ "$#" == 0 ]]
 | |
| then
 | |
|   cd "$COMP_DIR"
 | |
|   fpc pp -gl -oppcsparc -dExtDebug -Fu"sparc;systems" -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
 | |
|     SRC_DIR=`echo "$COMP_DIR/"{,sparc,systems}":"`
 | |
|     gdb -d "$SRC_DIR" --args "$COMP_DIR"/ppcsparc -s -al -Fi"$RTL_DIR"/{unix,linux,sparc,inc} -dSPARC "$@"
 | |
|   else
 | |
|     "$COMP_DIR"/ppcsparc -s -al -Fi"$RTL_DIR"/{unix,linux,sparc,inc} -dSPARC "$@"
 | |
|   fi
 | |
| fi
 | 
