瀏覽代碼

* do not write the ".file" directive in assembler files for Darwin
(gcc doesn't do it either, and it causes the assembler to report
errors as if they occur in the Pascal source file)

git-svn-id: trunk@12205 -

Jonas Maebe 16 年之前
父節點
當前提交
807c63916e
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      compiler/aggas.pas

+ 7 - 1
compiler/aggas.pas

@@ -1111,7 +1111,13 @@ implementation
         n:=ExtractFileName(current_module.mainsource^)
         n:=ExtractFileName(current_module.mainsource^)
       else
       else
         n:=InputFileName;
         n:=InputFileName;
-      AsmWriteLn(#9'.file "'+FixFileName(n)+'"');
+
+      { gcc does not add it either for Darwin (and AIX). Grep for
+        TARGET_ASM_FILE_START_FILE_DIRECTIVE in gcc/config/*.h
+      }
+      if not(target_info.system in systems_darwin) then
+        AsmWriteLn(#9'.file "'+FixFileName(n)+'"');
+
       WriteExtraHeader;
       WriteExtraHeader;
       AsmStartSize:=AsmSize;
       AsmStartSize:=AsmSize;
       symendcount:=0;
       symendcount:=0;