Commit Graph

59 Commits

Author SHA1 Message Date
Michaël Van Canneyt
c9b88a1cd0 * Allow to disable 8.3 filename search 2023-11-12 09:55:30 +01:00
florian
299f942d29 * change TCachedSearchRec.Attr to longint as TCachedDirectoryEntry.Attr is also a longint, resolves #40343 2023-07-09 16:20:18 +02:00
florian
b934517871 * patch by Rika: Optimize some compiler/CFileUtl.pas functions for returning unchanged strings, resolves #39882 2022-10-07 22:32:59 +02:00
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
Jonas Maebe
6483b3f5e3 * fixed opt-in sysroot substitution again, renamed the three-argument version
TSearchPathList.AddPath() to AddLibraryPath() to make it clear it's only
    to be used for adding library search paths (and replaced one case where
    it was used for a source file search path with a call to the
    two-argument version)
  * also added some missing '=' prefixes to built-in library search paths,
    and fixed wrong DirectoryExists checks in t_linux in case of using
    a sysroot, cross-compiling or linking on target

git-svn-id: trunk@43312 -
2019-10-26 13:48:30 +00:00
pierre
5bfebeea4e Avoid GPF if currPath is empty in AddPath method, as this is accepted and handled later
git-svn-id: trunk@43306 -
2019-10-23 10:39:49 +00:00
florian
54f16d68be * fixes TSearchPathList.AddPath after r43279 (without this commit, tests/test/tudots2.pp is broken)
git-svn-id: trunk@43302 -
2019-10-21 20:48:34 +00:00
Jonas Maebe
78fb35525f * change convention for searching sysroot library paths to be the same as the
one used by GNU ld: only search for library paths in the sysroot if they
    are built into the compiler or start with "=". Previously, all
    user-provided library paths were also searched in the sysroot
    (mantis #36198)

git-svn-id: trunk@43279 -
2019-10-20 17:26:44 +00:00
nickysn
40e6c06f67 * fixes to the compiler util exe search routines, which caused the compiler to
erroneusly find '/usr/bin/ld' instead of '/usr/bin/ld.bfd' on OpenBSD, which
  silently produced broken executables, which made this bug even more "fun" to
  find. :)

git-svn-id: trunk@42128 -
2019-05-26 16:57:08 +00:00
pierre
29bcef2825 Fix compilation (with -st option) of compiler for macos OS target
git-svn-id: trunk@41065 -
2019-01-25 08:00:58 +00:00
yury
f5ce7c572b * Removed inline for Unix2AmigaPath since it is not necessary and can't be inlined anyway due to ansistring conversion.
git-svn-id: trunk@40226 -
2018-11-05 14:37:01 +00:00
Károly Balogh
e7025b6759 another fix for the new warning introduced in r39347, hopefully it fixes win32 build
git-svn-id: trunk@39352 -
2018-06-30 16:51:41 +00:00
florian
68eb921d46 * broken compilation after r39347 fixed
git-svn-id: trunk@39349 -
2018-06-30 12:30:25 +00:00
pierre
4d3939ba7e Rectify display of shell command, do it if -vx option is used even without -vu
git-svn-id: trunk@34383 -
2016-08-28 13:02:34 +00:00
Jonas Maebe
8f645fdc83 * removed hack to disable dircache for DragonFly BSD now that its dirent
handling has been fixed

git-svn-id: trunk@32707 -
2015-12-24 10:54:53 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
Jonas Maebe
00ea5e1636 * made maybequoted_for_script() public
* added script_fpcres identifier
  * always quote file names for fpcres using double quotes, as it doesn't
    support single quotes (mantis #26866)

git-svn-id: trunk@28881 -
2014-10-19 16:34:43 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
pierre
e87e2f9c30 Print out command line before running it with -vx option
git-svn-id: trunk@26443 -
2014-01-12 23:06:19 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
Károly Balogh
ba89914471 use the new HASAMIGA instead of the non-existing AmigaShell
git-svn-id: trunk@26124 -
2013-11-24 01:22:07 +00:00
svenbarth
2e70575afc Allow compilation of compiler with 2.6.x RTL for simplyfied development.
cfileutl.pas:
  + define a TRawByteSearchRec if we're not compiling with at least a 2.7.1 compiler

git-svn-id: trunk@25456 -
2013-09-11 16:05:24 +00:00
Jonas Maebe
efa95bed66 * changes so the compiler can be compiled with a unicode RTL without warnings
git-svn-id: branches/cpstrrtl@25307 -
2013-08-19 22:47:07 +00:00
Jonas Maebe
fcbc435435 * only call findclose if findfirst succeeded
git-svn-id: trunk@25188 -
2013-07-30 13:39:32 +00:00
Károly Balogh
36bf03372b handle the cases where f contains an absolute path
git-svn-id: trunk@24726 -
2013-06-01 15:22:58 +00:00
Károly Balogh
b3c4450186 make a warning a note, so it compiles with -Sew
git-svn-id: trunk@24651 -
2013-05-30 19:04:14 +00:00
Jonas Maebe
d749ac5354 * make ansistring unique before starting to change it using a pchar
git-svn-id: trunk@23055 -
2012-11-24 13:15:54 +00:00
Jonas Maebe
0841ee6e4f * GNU ld only supports double quotes in its response file -> requote there
as well under Unix (mantis #21928, caused by r21069)

git-svn-id: trunk@21208 -
2012-05-03 12:41:16 +00:00
pierre
8e91872ce6 * Fix RequotedExecuteProcess
git-svn-id: trunk@21078 -
2012-04-27 12:10:32 +00:00
Jonas Maebe
02413c8a57 * moved maybequoted() from cutils to cfileutl and let its behaviour vary
based on the actual target platform rather than always on the host
    platform
  * on Unix, use single rather than double quotes for quoting, so it also
    properly handles $, ! and `, which keep their special meaning when
    appearing in scripts inside double quotes
  * since sysutils.executeprocess() can only deal with double-quoted
    strings in parameters, re-quote parameters on Unix when they turn
    out not to be for scripts but for direct execution (which is most
    of the time, but unfortunately doing the reverse is not possible
    because parameters used in scripts sometimes contain script-specific
    code that must not be quoted, such as `cat link.res`)
   -> always use cfileutl.RequotedExecuteProcess() rather than
    sysutils.ExecuteProcess() in the compiler (added a bunch of dummy
    ExecuteProcess string constants to common units to prevent accidental
    usage)

git-svn-id: branches/jvmbackend@20901 -
2012-04-16 19:52:36 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
Jonas Maebe
74d684878d * factored searching the exe directories from FindExe() into
FindFileInExeLocations()
  * search for jasmin.jar using FindFileInExeLocations and properly
    build the java command line, so jasmin can be called successfully
    by the compiler
  * properly create separate assembler files for each class, and
    correctly specify the class name and superclass for each class
    (units themselves are still hardcoded to descend from java.lang.Object)

git-svn-id: branches/jvmbackend@18318 -
2011-08-20 07:38:21 +00:00
florian
33de8c8336 * fix potential range check error in cfileutl, should resolve #19405
git-svn-id: trunk@17660 -
2011-06-04 22:14:55 +00:00
Jonas Maebe
5fc94a5076 * don't look for helper executables (assembler, linker, resource compiler,
wpo helpers) in the current directory

git-svn-id: trunk@16689 -
2011-01-02 20:25:41 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
Jonas Maebe
db2655459c * fixed 255 max path length assumptions left over from when the paths were
shortstrings (mentioned in mantis #15783)

git-svn-id: trunk@14997 -
2010-03-09 19:44:07 +00:00
Károly Balogh
c11243c83d * made MorphOS build to cycle again: fixed path_absolute() for Amiga and MorphOS, and fixed AllFilesMask for MorphOS
git-svn-id: trunk@13474 -
2009-07-30 00:57:06 +00:00
Jonas Maebe
5c006b9b86 * enable the directory cache by default starting with the first lookup
(fixes mantis #13756)
  + added -Fd command line parameter to disable the directory cache

git-svn-id: trunk@13325 -
2009-06-26 14:55:31 +00:00
Károly Balogh
446e2161ce + Made a single Amiga/MorphOS-specific PathConv import to cfileutl.pas, instead of importing it every single place it is needed.
+ Forced PathConv argument to ShortString. Made a note about implementing AnsiString-aware PathConv later.
+ Made code to use the unified PathConv import (named Unix2AmigaPath(), which explains its functionality better).
+ The above changes fixed various compiler crashes in TAsmScriptAmiga, caused by invoking PathConv with AnsiString arguments, while it only supports ShortString

git-svn-id: trunk@12485 -
2009-01-03 14:34:59 +00:00
Tomas Hajny
088c441d9d * extended fix for web bug #12370 (more platforms supported and slightly more universal)
git-svn-id: trunk@12381 -
2008-12-17 22:58:33 +00:00
marco
8445fb74bd * fixed path_absolute, somehow it was not implemented for windows. Probably the $IF for windows fell away. Now defined for go32v2. Fixes 12370, and the solution was hinted at in that bugreport.
git-svn-id: trunk@12372 -
2008-12-16 23:05:16 +00:00
yury
4cabbe0e39 * Fixed compiler cycling with enabled range and overflow checking.
git-svn-id: trunk@11489 -
2008-07-29 21:11:03 +00:00
yury
0bcaf8845f * Fixed 'mixed signed/unsigned' warnings.
* Suppressed 2 unreachable code warnings.
* Now x86 compiler compiles without warnings and notes! It will be great to keep such state in future...

git-svn-id: trunk@11455 -
2008-07-23 13:16:46 +00:00
yury
fcceb9cfa1 * Removed/ifdefed/commented unused local variables.
git-svn-id: trunk@11430 -
2008-07-20 23:00:31 +00:00
Jonas Maebe
f1bd686065 * re-applied r7485, which got lost in r7639 because an old
revision (r6623) of the file was renamed to cfileutl
    (mantis #10873)

git-svn-id: trunk@10488 -
2008-03-14 20:37:44 +00:00
peter
241c65d5ec * optimize fixpath, findfile to not require temp ansistrings
* check for verbosity for V_Tried level messages, patches from Sergei Gorelkin

git-svn-id: trunk@9297 -
2007-11-19 22:24:52 +00:00
peter
af9e8b489c * replace : with ; in AddPath
git-svn-id: trunk@9161 -
2007-11-08 08:24:07 +00:00
Jonas Maebe
71c314c550 * Only start caching a directory once more than 20 lookups have been
done in it, to avoid caching very large current directories (such as
    those of the testsuite) without reason. It would be better if that
    decision were based on a fraction of the total number of entries in
    each directory, but that information doesn not appear to be available
    in a cross-platform way

git-svn-id: trunk@8938 -
2007-10-25 20:30:04 +00:00
micha
0625040eba + add -XR switch for target root file system with libs (also used for C lib type detection)
git-svn-id: trunk@8695 -
2007-09-30 15:00:54 +00:00