Browse Source

* give an error for -Xr on platforms where this parameter is ignored

git-svn-id: trunk@13640 -
Jonas Maebe 16 years ago
parent
commit
eb12fdb617
1 changed files with 12 additions and 3 deletions
  1. 12 3
      compiler/options.pas

+ 12 - 3
compiler/options.pas

@@ -120,6 +120,10 @@ const
                         + [system_i386_freebsd]
                         + [system_i386_netbsd]
                         + [system_i386_wdosx];
+                        
+  suppported_targets_x_smallr = system_linux
+                             + [system_i386_haiku]
+                             + [system_i386_beos];
 
 {****************************************************************************
                                  Defines
@@ -1617,9 +1621,14 @@ begin
                     'p' : ; { Ignore used by fpc.pp }
                     'r' :
                       begin
-                        rlinkpath:=Copy(more,2,length(More)-1);
-                        DefaultReplacements(rlinkpath);
-                        More:='';
+                        if (target_info.system in suppported_targets_x_smallr) then
+                          begin
+                            rlinkpath:=Copy(more,2,length(More)-1);
+                            DefaultReplacements(rlinkpath);
+                          end
+                        else
+                          UnsupportedPara('-Xr');
+                        more:='';
                       end;
                     'R' :
                       begin