+2013-10-10 Torvald Riegel <triegel@redhat.com>
+
+ * scripts/bench.pl: Add include-sources directive.
+ * benchtests/README: Update documentation.
+
2013-10-10 Joseph Myers <joseph@codesourcery.com>
* soft-fp/soft-fp.h (FP_INIT_EXCEPTIONS): New macro.
inputs.
- ret: This should be assigned the type that the function returns. This
directive may be skipped if the function does not return a value.
- - includes: This should be assigned a comma separated list of headers that
+ - includes: This should be assigned a comma-separated list of headers that
need to be included to provide declarations for the function and types it
- may need.
+ may need (specifically, this includes using "#include <header>").
+ - include-sources: This should be assigned a comma-separated list of source
+ files that need to be included to provide definitions of global variables
+ and functions (specifically, this includes using "#include "source").
- name: See following section for instructions on how to use this directive.
Lines beginning with a single hash '#' are treated as comments. See
my $variant = "";
my @curvals;
my %vals;
-my @include_files;
+my @include_headers;
+my @include_sources;
my $incl;
open INPUTS, "<$func-inputs" or die $!;
chomp;
# Directives.
- if (/^## (\w+): (.*)/) {
+ if (/^## ([\w-]+): (.*)/) {
# Function argument types.
if ($1 eq "args") {
@args = split(":", $2);
}
elsif ($1 eq "includes") {
- @include_files = split (",", $2);
+ @include_headers = split (",", $2);
+ }
+
+ elsif ($1 eq "include-sources") {
+ @include_sources = split (",", $2);
}
# New variant. This is the only directive allowed in the body of the
undef @curvals;
next LINE;
}
+
+ else {
+ die "Unknown directive: ".$1;
+ }
}
# Skip over comments.
# Print the definitions and macros.
-foreach $incl (@include_files) {
+foreach $incl (@include_headers) {
print "#include <" . $incl . ">\n";
}
+# Print the source files.
+foreach $incl (@include_sources) {
+ print "#include \"" . $incl . "\"\n";
+}
+
if (@args > 0) {
# Save values in the last variant.
$vals{$variant} = \@curvals;