summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPeter Rosin <peda@lysator.liu.se>2013-05-30 11:31:02 +0200
committerPeter Rosin <peda@lysator.liu.se>2013-05-30 11:31:02 +0200
commit9f325eea27e41d868fbe020fe4034bec3c758fb0 (patch)
treebc470ebdb2073c396ad75d1d514579a5cc38597b /bin
parent649c03b464cf55f50e696ebea482c65339ff4832 (diff)
downloadautomake-9f325eea27e41d868fbe020fe4034bec3c758fb0.tar.gz
automake: assume we can always pass '-o' to the C compiler
It is assumed that we can pass -c -o to the C compiler, so remove some special casing and always do that. This change is similar in spirit to v1.13.1d-217-g7299c4d "depend: assume we can always pass '-o' to the C compiler" This change also happen to fix a testsuite failure (t/silent-many-languages.sh) when mixing MSVC and GNU fortran, which have different default object file extensions (.obj vs. .o). This difference in object file extension is not handled well and caused Automake to look for MSVC objects with .o extension. Always using -o makes MSVC create .o object files and linking succeeds. Not that anybody recommends mixing toolchains or anything. * bin/automake.in (handle_languages): Remove conditional modification of 'output_flag' entry for 'c'. (register_language ('name' => 'c')): Add 'output_flag' entry set to '-o'. Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Diffstat (limited to 'bin')
-rw-r--r--bin/automake.in11
1 files changed, 2 insertions, 9 deletions
diff --git a/bin/automake.in b/bin/automake.in
index 24ff2a6d6..40b31814b 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -632,6 +632,7 @@ register_language ('name' => 'c',
'linker' => 'LINK',
'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
'compile_flag' => '-c',
+ 'output_flag' => '-o',
'libtool_tag' => 'CC',
'extensions' => ['.c']);
@@ -1313,14 +1314,6 @@ sub handle_languages ()
if (((! option 'no-dependencies') && $lang->autodep ne 'no')
|| defined $lang->compile)
{
- # Some C compilers don't support -c -o. Use it only if really
- # needed.
- my $output_flag = $lang->output_flag || '';
- $output_flag = '-o'
- if (! $output_flag
- && $lang->name eq 'c'
- && option 'subdir-objects');
-
# Compute a possible derived extension.
# This is not used by depend2.am.
my $der_ext = ($lang->output_extensions->($ext))[0];
@@ -1364,7 +1357,7 @@ sub handle_languages ()
COMPILE => '$(' . $lang->compiler . ')',
LTCOMPILE => '$(LT' . $lang->compiler . ')',
- -o => $output_flag,
+ -o => $lang->output_flag,
SUBDIROBJ => !! option 'subdir-objects');
}