libk  Check-in [06e32bd3b4]

Overview
Comment:add assembly output flag to build.sh
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 06e32bd3b45f407401e94b070de767884ef451f5df449ca24f8262b8decb8fca
User & Date: lexi on 2019-08-21 03:10:41
Other Links: manifest | tags
Context
2019-08-21
03:44
make crt behave as a C runtime launcher should; comment code thoroughly check-in: f0f16493ca user: lexi tags: trunk
03:10
add assembly output flag to build.sh check-in: 06e32bd3b4 user: lexi tags: trunk
01:58
enable debugging and add -ffreestanding to gcc cmd line to squash attempts to "optimize" functions by converting them to libc calls, e.g. turning kmzero() calls into memset() calls check-in: 49bf71fb47 user: lexi tags: trunk
Changes

Modified build.sh from [3df2029917] to [e1362458a3].

   156    156   	fi
   157    157   	# only rebuild the file if the source file is newer
   158    158   	if test "$debug" = yes; then
   159    159   		local dflag="-g"
   160    160   	else
   161    161   		local dflag="-O4"
   162    162   	fi
   163         -	report $cc $src $3 $dflag -std=c11 -isystem "$to" -isystem "$gen" -isystem "arch/" -ffreestanding -nostdlib "-L$to" "-o$output"
          163  +	if test "$assembly" = yes; then
          164  +		report $cc $src $3 $dflag -std=c11 -isystem "$to" -isystem "$gen" -isystem "arch/" -ffreestanding -nostdlib "-L$to" -masm=intel -fverbose-asm -S "-o$output.s"
          165  +	else
          166  +		report $cc $src $3 $dflag -std=c11 -isystem "$to" -isystem "$gen" -isystem "arch/" -ffreestanding -nostdlib "-L$to" "-o$output"
          167  +	fi
   164    168   }
   165    169   
   166    170   say "commencing libk build $build at $(timestamp)"
   167    171   # set -x
   168    172   
   169    173   # get type data
   170    174   mkdir -p $gen