Module: gas-preprocessor Branch: master Commit: 5e5f63c03f46dad9dc3c0f91ef18ab293794de06
Author: Janne Grunau <janne-li...@jannau.net> Committer: Janne Grunau <janne-li...@jannau.net> Date: Sat Aug 9 15:23:59 2014 +0200 remove all lines starting with '#' '#' at the start of the line indicates on all archs the start of a comment or a preprocessor directive. This is after preprocessing so removing the lines as comment is safe. Line number comments are stripped by this too since gas-preprocessor.pl ignores line numbers. So it removes just misleading debug information. Incidentally fixes gas detection in libav's configure with Xcode on aarch64. The temporary filename contains two '/'. The filename is added as line number comment during preprocessing. The comment removal in gas-preprocessor detects it on aarch64. Clang fails since the line number comment has an unterminated string constant. --- gas-preprocessor.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 86293d1..c8f2b1b 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -264,13 +264,15 @@ if ($force_thumb) { # note that the handling of arguments is probably overly permissive vs. gas # but it should be the same for valid cases while (<INPUT>) { + # remove lines starting with '#', preprocessing is done, '#' at start of + # the line indicates a comment for all supported archs (aarch64, arm, ppc + # and x86). Also strips line number comments but since they are off anyway + # it is no loss. + s/^#.*$//; # remove all comments (to avoid interfering with evaluating directives) s/(?<!\\)$inputcomm.*//x; # Strip out windows linefeeds s/\r$//; - # Strip out line number comments - armasm can handle them in a separate - # syntax, but since the line numbers are off they are only misleading. - s/^#\s+(\d+).*// if $as_type =~ /armasm/; foreach my $subline (split(";", $_)) { # Add newlines at the end of lines that don't already have one _______________________________________________ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits