RFR(XS): 8146425: After change 8142907 'EXCLUDE_FILE' is wrongly interpreted as pattern

Volker Simonis volker.simonis at gmail.com
Mon Jan 4 19:26:34 UTC 2016


could someone please review the following small fix:


Change "8142907: Integration of minor fixes from the build-infra
project" has introduced a new parameter called EXCLUDE_PATTERN for
calls to SetupNativeCompilation.

Unfortunately this change also altered the semantics of EXCLUDE_FILE
which is now interpreted as a pattern of the form "*EXCLUDE_FILE".
This is because of the following code:

   ifneq ($$($1_ALL_EXCLUDE_FILES),)
         $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_ALL_EXCLUDE_FILES)))
     $1_EXCLUDE_FILES_PAT := $$(addprefix %,$$($1_EXCLUDE_FILES_PAT))
     $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES_PAT),$$($1_SRCS))

$1_EXCLUDE_FILES_PAT is initialized to contain all the simple file
names which are to be excluded plus all of these file names prefixed
with each src path. In the next step, all the entries in
$1_EXCLUDE_FILES_PAT are converted to patterns by prefixing them with
the wildcard character "%". Finally, the patterns are matched against
all the existing source files. This leads to the problem that every
file which was given as EXCLUDE_FILES will be converted into a
"%EXCLUDE_FILES" pattern thus effectively excluding not just files
with the name EXCLUDE_FILES but actually all files ending in

This hit us badly on AIX where we have the implementation file
AixNativeThread.c and the exclude NativeThread.c. After change 8142907
AixNativeThread.c was silently excluded from the compilation leading
to errors during runtime because the file contained some native
methods from sun.nio.ch which are not always used.

Thank you and best regards,

More information about the build-dev mailing list