aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-29 09:48:27 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:41 -0300
commitaec36af87b9c87a1402e4326d5ead9f9f46b97f4 (patch)
tree4408c9db1c3e73e2ff5e62f587bf6d0bbc5baffe
parentedae9c07c2b3449103a76ae77cc12732f604c248 (diff)
downloadglibc-aec36af87b9c87a1402e4326d5ead9f9f46b97f4.zip
glibc-aec36af87b9c87a1402e4326d5ead9f9f46b97f4.tar.gz
glibc-aec36af87b9c87a1402e4326d5ead9f9f46b97f4.tar.bz2
conform: Use -dD instead of -dN on compiler invocation
clang does not support -dN.
-rw-r--r--conform/conformtest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/conform/conformtest.py b/conform/conformtest.py
index 8337afc..d38afb0 100644
--- a/conform/conformtest.py
+++ b/conform/conformtest.py
@@ -620,7 +620,7 @@ class HeaderTests(object):
out_file = os.path.join(self.temp_dir, 'namespace-out')
with open(c_file, 'w') as c_file_out:
c_file_out.write('#include <%s>\n' % self.header)
- cmd = ('%s %s -E %s -P -Wp,-dN > %s'
+ cmd = ('%s %s -E %s -P -Wp,-dD > %s'
% (self.cc, self.cflags_namespace, c_file, out_file))
subprocess.check_call(cmd, shell=True)
bad_tokens = set()
@@ -639,11 +639,11 @@ class HeaderTests(object):
# macros defined by user code including the
# header.)
continue
- match = re.match(r'#define (.*)', line)
+ match = re.match(r'#define (.*?[^\(\s]+)', line)
if match:
self.check_token(bad_tokens, match.group(1))
continue
- match = re.match(r'#undef (.*)', line)
+ match = re.match(r'#undef (.*?[^\(\s]+)', line)
if match:
bad_tokens.discard(match.group(1))
continue