source: trunk/minix/lib/float/FP.compile@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 533 bytes
RevLine 
[9]1#!/bin/sh
2# Author: Kees J. Bot
3# Compile one soft FP source file.
4# (These files shouldn't be optimized normally, but the 16-bit C compiler
5# only optimizes scratch register allocation a bit with -O. To the 32-bit
6# compiler -O is a no-op.)
7
8case $#:$1 in
91:*.c) ;;
10*) echo "$0: $1: not a C file" >&2; exit 1
11esac
12
13base="`basename "$1" .c`"
14trap 'rm -f tmp.s "$base.s"; exit 1' 2
15
16cc -O -I. -D_MINIX -D_POSIX_SOURCE -S "$1" &&
17mv "$base.s" tmp.s &&
18sed -f FP.script tmp.s > "$base.s" &&
19cc -c "$base.s" &&
20rm tmp.s "$base.s"
Note: See TracBrowser for help on using the repository browser.