New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735206 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 537368



Sign in to add a comment

clang errors out if .h file is specified as an input along with .c/.cpp

Project Member Reported by manojgupta@chromium.org, Jun 20 2017

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

 
Blocking: 537368
Cc: grundler@chromium.org kyan@chromium.org kkunduru@chromium.org
This error is encountered in building net-wireless/crda for whirlwind.
Opened upstream llvm bug https://bugs.llvm.org//show_bug.cgi?id=33533
Sent for review @ https://reviews.llvm.org/D34426
Owner: manojgupta@chromium.org
Status: Started (was: Untriaged)
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.
what is the next action here? 
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.
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 1 2017

Status: WontFix (was: Started)
Crda build is fixed by changing the Makefile. No need to make any clang changes.

Sign in to add a comment