[LLVMdev] llvm-gcc and -march

Nichols A. Romero naromero at gmail.com
Mon Aug 22 16:12:18 PDT 2011


So my original post subject was for -march, but that was my mistake.
The command line option
is -arch.

Since presumably Macports is just fetching an llvm tar ball from some
repository, is the issue that llvm
has been misconfigure in some obvious way? Yes, I can take a look at
the driverdriver.c source file
as well.

Should this also be working in LLVM 2.9 or is the latest SVN also needed?

On Mon, Aug 22, 2011 at 6:03 PM, Eric Christopher <echristo at apple.com> wrote:
>
> On Aug 22, 2011, at 3:59 PM, Bob Wilson wrote:
>
>> The -arch option is handled by Apple's "driver-driver", and the MacPorts build is probably not using that.  See the driverdriver.c source file in llvm-gcc for details.
>>
>
> He's asking about the -march option which should work either way.
>
> Also, the driver-driver should be in the sources that they're using even still.
>
> Nichols: You might want to talk to the llvm-gcc port maintainer. There's nothing obviously wrong other than it not working for you so I'm not sure what's going on.
>
> -eric
>
>> On Aug 22, 2011, at 3:08 PM, Nichols A. Romero wrote:
>>
>>> Here is some more info:
>>>
>>> [naromero:~/pmr] naromero% llvm-gcc -v
>>> Using built-in specs.
>>> Target: x86_64-apple-darwin10
>>> Configured with: ../llvm-gcc-4.2-2.9.source/configure
>>> --prefix=/opt/local --host=x86_64-apple-darwin10
>>> --enable-llvm=/opt/local --enable-languages=c,c++,objc,obj-c++,fortran
>>> --libdir=/opt/local/lib/llvm-gcc42
>>> --includedir=/opt/local/include/llvm-gcc42
>>> --infodir=/opt/local/share/info --mandir=/opt/local/share/man
>>> --with-local-prefix=/opt/local --with-system-zlib --disable-nls
>>> --program-prefix=llvm- --program-suffix=-4.2 --with-gmp=/opt/local
>>> --with-mpfr=/opt/local --with-build-time-tools=/usr/bin
>>> --with-gxx-include-dir=/usr/include/c++/4.2.1 --with-slibdir=/usr/lib
>>> Thread model: posix
>>> gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
>>>
>>> I tried this on a simple file using your syntax and it still didn't work.
>>> [naromero:~/pmr] naromero% llvm-gcc -march=nocona pow.c -S -arch x86_64
>>> cc1: error: unrecognized command line option "-arch"
>>>
>>> Not that this macport is using LLVM 2.9.
>>>
>>> On Mon, Aug 22, 2011 at 4:46 PM, Eric Christopher <echristo at apple.com> wrote:
>>>> Still nothing here:
>>>>
>>>> [yendi:~] echristo% llvm-gcc -march=nocona foo.c -S -arch x86_64
>>>> [yendi:~] echristo%
>>>>
>>>> So, perhaps you could send more information? Or bug the mac ports people.
>>>>
>>>> -eric
>>>>
>>>> On Aug 22, 2011, at 2:44 PM, Nichols A. Romero wrote:
>>>>
>>>>> This comes up when trying to compile Valgrind, here is the full compile line:
>>>>>
>>>>> /opt/local/bin/llvm-gcc-4.2 -Wbad-function-cast -Wcast-qual
>>>>> -Wcast-align -fstrict-aliasing \
>>>>>             -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow
>>>>> -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
>>>>> -Wno-format-zero-length -fno-strict-aliasing -mmacosx-version-min=10.5
>>>>> -fno-stack-protector \
>>>>>                              -O -S -o auxprogs/genoffsets.s \
>>>>>                                       auxprogs/genoffsets.c
>>>>>
>>>>> On Mon, Aug 22, 2011 at 4:39 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>>>>> On Mon, Aug 22, 2011 at 2:34 PM, Nichols A. Romero <naromero at gmail.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I apologize if I am not asking on the right mailing list.
>>>>>>>
>>>>>>> I am using the llvm-gcc4.2 from MacPorts.
>>>>>>> https://trac.macports.org/browser/trunk/dports/lang/llvm-gcc42/Portfile
>>>>>>>
>>>>>>> llvm-gcc does not seem to accept the -march flag. This is the error,
>>>>>>> I got:
>>>>>>>
>>>>>>> cc1: error: unrecognized command line option "-march"
>>>>>>>
>>>>>>> The port developer asked me to find out if this is a known issue.
>>>>>>
>>>>>> llvm-gcc 4.2 should support almost exactly the same command-line
>>>>>> options as gcc 4.2, including -march.  How exactly are you getting
>>>>>> this error?
>>>>>>
>>>>>> -Eli
>>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Nichols A. Romero, Ph.D.
>>> Argonne Leadership Computing Facility
>>> Argonne, IL 60490
>>> (630) 447-9793
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>



-- 
Nichols A. Romero, Ph.D.
Argonne Leadership Computing Facility
Argonne, IL 60490
(630) 447-9793




More information about the llvm-dev mailing list