"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/compiler/fbc.bas" between
FreeBASIC-1.07.0-source.tar.gz and FreeBASIC-1.07.1-source.tar.gz

About: FreeBasic is a set of cross-platform development tools consisting of a compiler, GNU-based assembler, linker and archiver, and supporting runtime libraries, including a software-based graphics library.

fbc.bas  (FreeBASIC-1.07.0-source):fbc.bas  (FreeBASIC-1.07.1-source)
skipping to change at line 24 skipping to change at line 24
#if defined( ENABLE_STANDALONE ) and defined( __FB_WIN32__ ) #if defined( ENABLE_STANDALONE ) and defined( __FB_WIN32__ )
#define ENABLE_GORC #define ENABLE_GORC
#endif #endif
enum enum
PRINT_HOST PRINT_HOST
PRINT_TARGET PRINT_TARGET
PRINT_X PRINT_X
PRINT_FBLIBDIR PRINT_FBLIBDIR
PRINT_SHA1
end enum end enum
type FBC_EXTOPT type FBC_EXTOPT
gas as zstring * 128 gas as zstring * 128
ld as zstring * 128 ld as zstring * 128
gcc as zstring * 128 gcc as zstring * 128
end type end type
type FBCIOFILE type FBCIOFILE
'' Input file name (usually *.bas, but also *.rc, *.res, *.xpm) '' Input file name (usually *.bas, but also *.rc, *.res, *.xpm)
skipping to change at line 1776 skipping to change at line 1777
case OPT_PREFIX case OPT_PREFIX
fbc.prefix = pathStripDiv(arg) fbc.prefix = pathStripDiv(arg)
hReplaceSlash( fbc.prefix, asc( FB_HOST_PATHDIV ) ) hReplaceSlash( fbc.prefix, asc( FB_HOST_PATHDIV ) )
case OPT_PRINT case OPT_PRINT
select case( arg ) select case( arg )
case "host" : fbc.print = PRINT_HOST case "host" : fbc.print = PRINT_HOST
case "target" : fbc.print = PRINT_TARGET case "target" : fbc.print = PRINT_TARGET
case "x" : fbc.print = PRINT_X case "x" : fbc.print = PRINT_X
case "fblibdir" : fbc.print = PRINT_FBLIBDIR case "fblibdir" : fbc.print = PRINT_FBLIBDIR
case "sha-1" : fbc.print = PRINT_SHA1
case else case else
hFatalInvalidOption( arg ) hFatalInvalidOption( arg )
end select end select
case OPT_PROFILE case OPT_PROFILE
fbSetOption( FB_COMPOPT_PROFILE, TRUE ) fbSetOption( FB_COMPOPT_PROFILE, TRUE )
case OPT_R case OPT_R
'' -r changes the output type to .o, like -c, i.e. -m may have '' -r changes the output type to .o, like -c, i.e. -m may have
'' to be used to mark the main module, just like -c. '' to be used to mark the main module, just like -c.
skipping to change at line 2940 skipping to change at line 2942
'' prints -NaN (IND) under the ASM backend because the FPU does t he '' prints -NaN (IND) under the ASM backend because the FPU does t he
'' subtraction, however with the C backend with, gcc -ffast-math '' subtraction, however with the C backend with, gcc -ffast-math
'' optimizes out the subtraction (even under -O0) and inserts 0 i nstead. '' optimizes out the subtraction (even under -O0) and inserts 0 i nstead.
'' Define signed integer overflow '' Define signed integer overflow
ln += "-fwrapv " ln += "-fwrapv "
'' Avoid gcc exception handling bloat '' Avoid gcc exception handling bloat
ln += "-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwin d-tables " ln += "-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwin d-tables "
'' Prevent format string errors on gcc 9.x. (enabled by default w
ith '-Wall')
'' TODO: fbc currently emits the ZSTRING type as 'uint8' when it
'' should probably preserve the 'char' type. In C, there are 3
'' distinct types, 'char', 'unsigned char', 'signed char'.
'' See ir-hlc.bas:hEmitType()
ln += "-Wno-format "
if( fbGetOption( FB_COMPOPT_DEBUGINFO ) ) then if( fbGetOption( FB_COMPOPT_DEBUGINFO ) ) then
ln += "-g " ln += "-g "
end if end if
if( fbGetOption( FB_COMPOPT_FPUTYPE ) = FB_FPUTYPE_SSE ) then if( fbGetOption( FB_COMPOPT_FPUTYPE ) = FB_FPUTYPE_SSE ) then
ln += "-mfpmath=sse -msse2 " ln += "-mfpmath=sse -msse2 "
end if end if
select case( fbGetCpuFamily( ) ) select case( fbGetCpuFamily( ) )
case FB_CPUFAMILY_X86, FB_CPUFAMILY_X86_64 case FB_CPUFAMILY_X86, FB_CPUFAMILY_X86_64
skipping to change at line 3504 skipping to change at line 3513
print " -nostrip Do not strip symbol information from the output file" print " -nostrip Do not strip symbol information from the output file"
print " -o <file> Set .o (or -pp .bas) file name for prev/next in put file" print " -o <file> Set .o (or -pp .bas) file name for prev/next in put file"
print " -O <value> Optimization level (default: 0)" print " -O <value> Optimization level (default: 0)"
print " -p <path> Add a library search path" print " -p <path> Add a library search path"
print " -pic Generate position-independent code (non-x86 Uni x shared libs)" print " -pic Generate position-independent code (non-x86 Uni x shared libs)"
print " -pp Write out preprocessed input file (.pp.bas) onl y" print " -pp Write out preprocessed input file (.pp.bas) onl y"
print " -prefix <path> Set the compiler prefix path" print " -prefix <path> Set the compiler prefix path"
print " -print host|target Display host/target system name" print " -print host|target Display host/target system name"
print " -print fblibdir Display the compiler's lib/ path" print " -print fblibdir Display the compiler's lib/ path"
print " -print x Display output binary/library file name (if kno wn)" print " -print x Display output binary/library file name (if kno wn)"
if( verbose ) then
print " -print sha-1 Display compiler's source code commit sha-1 (if
known)"
end if
print " -profile Enable function profiling" print " -profile Enable function profiling"
print " -r Write out .asm/.c/.ll (-gen gas/gcc/llvm) only" print " -r Write out .asm/.c/.ll (-gen gas/gcc/llvm) only"
print " -rr Write out the final .asm only" print " -rr Write out the final .asm only"
print " -R Preserve temporary .asm/.c/.ll/.def files" print " -R Preserve temporary .asm/.c/.ll/.def files"
print " -RR Preserve the final .asm file" print " -RR Preserve the final .asm file"
print " -s console|gui Select win32 subsystem" print " -s console|gui Select win32 subsystem"
print " -showincludes Display a tree of file names of #included files " print " -showincludes Display a tree of file names of #included files "
print " -static Prefer static libraries over dynamic ones when linking" print " -static Prefer static libraries over dynamic ones when linking"
print " -strip Omit all symbol information from the output fil e" print " -strip Omit all symbol information from the output fil e"
print " -t <value> Set .exe stack size in kbytes, default: 1024 (w in32/dos)" print " -t <value> Set .exe stack size in kbytes, default: 1024 (w in32/dos)"
skipping to change at line 3548 skipping to change at line 3560
if( len( config ) > 0 ) then if( len( config ) > 0 ) then
config += ", " config += ", "
end if end if
config += *info config += *info
end sub end sub
private sub hPrintVersion( byval verbose as integer ) private sub hPrintVersion( byval verbose as integer )
dim as string config dim as string config
print "FreeBASIC Compiler - Version " + FB_VERSION + _ print "FreeBASIC Compiler - Version " + FB_VERSION + _
" (" + FB_BUILD_DATE + "), built for " + fbGetHostId( ) + " (" & fbGetHostBits( ) & "bit)" " (" + FB_BUILD_DATE_ISO + "), built for " + fbGetHostId( ) + " ( " & fbGetHostBits( ) & "bit)"
print "Copyright (C) 2004-2019 The FreeBASIC development team." print "Copyright (C) 2004-2019 The FreeBASIC development team."
#ifdef ENABLE_STANDALONE #ifdef ENABLE_STANDALONE
hAppendConfigInfo( config, "standalone" ) hAppendConfigInfo( config, "standalone" )
#endif #endif
#ifdef ENABLE_PREFIX #ifdef ENABLE_PREFIX
hAppendConfigInfo( config, "prefix: '" + ENABLE_PREFIX + "'" ) hAppendConfigInfo( config, "prefix: '" + ENABLE_PREFIX + "'" )
#endif #endif
if( len( config ) > 0 ) then if( len( config ) > 0 ) then
print config print config
end if end if
if( verbose ) then
fbcPrintTargetInfo( )
if( FB_BUILD_SHA1 > "" ) then
print "source sha-1: " & FB_BUILD_SHA1
end if
end if
end sub end sub
fbcInit( ) fbcInit( )
if( __FB_ARGC__ = 1 ) then if( __FB_ARGC__ = 1 ) then
hPrintOptions( FALSE ) hPrintOptions( FALSE )
fbcEnd( 1 ) fbcEnd( 1 )
end if end if
hParseArgs( __FB_ARGC__, __FB_ARGV__ ) hParseArgs( __FB_ARGC__, __FB_ARGV__ )
skipping to change at line 3623 skipping to change at line 3642
case PRINT_X case PRINT_X
'' If we have input files, -print x should give the outpu t name that we'd normally get. '' If we have input files, -print x should give the outpu t name that we'd normally get.
'' However, a plain "fbc -print x" without input files sh ould just give the .exe extension. '' However, a plain "fbc -print x" without input files sh ould just give the .exe extension.
if( have_input_files ) then if( have_input_files ) then
fbcDetermineMainName( ) fbcDetermineMainName( )
end if end if
hSetOutName( ) hSetOutName( )
print fbc.outname print fbc.outname
case PRINT_FBLIBDIR case PRINT_FBLIBDIR
print fbc.libpath print fbc.libpath
case PRINT_SHA1
print FB_BUILD_SHA1
end select end select
fbcEnd( 0 ) fbcEnd( 0 )
end if end if
fbcDetermineMainName( ) fbcDetermineMainName( )
'' Show help if there are no input files '' Show help if there are no input files
if( have_input_files = FALSE ) then if( have_input_files = FALSE ) then
hPrintOptions( fbc.verbose ) hPrintOptions( fbc.verbose )
fbcEnd( 1 ) fbcEnd( 1 )
 End of changes. 7 change blocks. 
1 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)