clang errors out if .h file is specified as an input along with .c/.cpp |
||||
Issue description
$ cat test.c
int foo()
{
return 0;
}
$ cat test.h
#include <stdlib.h>
$ clang -fpic -std=gnu99 -Wall -Werror -pedantic -Wall -g -o libtemp.so -shared -Wl,-soname,libtemp.so test.c test.h
clang-5.0: error: cannot specify -o when generating multiple output files
This works with GCC however.
$ gcc -fpic -std=gnu99 -Wall -Werror -pedantic -Wall -g -o libtemp.so -shared -Wl,-soname,libtemp.so test.c test.h => Produces libtemp.so
,
Jun 20 2017
This error is encountered in building net-wireless/crda for whirlwind.
,
Jun 20 2017
Opened upstream llvm bug https://bugs.llvm.org//show_bug.cgi?id=33533
,
Jun 20 2017
Sent for review @ https://reviews.llvm.org/D34426
,
Jun 20 2017
,
Jun 22 2017
From Richard Smith'c comment, rejecting might be the correct behavior since the pch output of .h compilation is dropped by gcc and does not really participate in the output. Probably Makefile should be fixed to not pass .h file on command line.
,
Jul 1 2017
what is the next action here?
,
Jul 1 2017
Fixing the Makefile in the net-wireless/crda is most likely the right thing to do. But don't have cycles for that right now.
,
Aug 1 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/overlays/project-jetstream-private/+/bfeea3b5471ff7415677f66fe90a178919399eec commit bfeea3b5471ff7415677f66fe90a178919399eec Author: Manoj Gupta <manojgupta@google.com> Date: Tue Aug 01 21:39:51 2017
,
Aug 1 2017
Crda build is fixed by changing the Makefile. No need to make any clang changes. |
||||
►
Sign in to add a comment |
||||
Comment 1 by manojgupta@chromium.org
, Jun 20 2017