[waffle] Building Waffle with XCode?

Nigel Stewart nigels.com at gmail.com
Wed Jul 10 08:52:21 PDT 2013


Chad,

The 1.2 branch wcore_tinfo.c seems fine for my purposes, so far.
Additionally, here is a patch for building cgl_config.m for Mac OS X 10.5

- Nigel


On Wed, Jul 10, 2013 at 8:21 AM, Nigel Stewart <nigels.com at gmail.com> wrote:
> Hi Chad,
>
> It's bit inconvenient that OS X 10.5 is bit so embedded in our workflow,
> well supported, rock-solid, automatic builds, and so on.  (Replacing
> my 2008 MacBook Pro to cope with clang!)  I guess there will come
> a time to switch to something newer.  But if it's less trouble overall
> to have a legacy code path for waffle, I'm all for that! :-)
>
> - Nigel
>
>
> On Tue, Jul 9, 2013 at 3:39 PM, Chad Versace
> <chad.versace at linux.intel.com> wrote:
>> Waffle didn't always require support for __thread and tls-model. The
>> wcore_tinfo.c used to have two code paths: one for environments that
>> supported those and environments that didn't.
>>
>> At one point, I removed support because I didn't expect any users would
>> still use such environments. But, now I see that I was wrong. I'll submit
>> patches to revert that removal and wait for your tested-by.
>>
>> The stable 1.2 branch still has support for environments
>> that lack __thread and tls-model, because that removal only exists on
>> master.
>> I believe that wcore_tinfo.c is buggy on 1.2, but it should still at least
>> compile. Could you try building the 1.2 branch, running `make check`, and
>> let me know if there are any hiccups?
>>
>>
>> On 07/03/2013 11:19 AM, Nigel Stewart wrote:
>>>
>>> Thank Jeff,
>>>
>>> I experimented some more with the XCode GUI (which I tend to avoid)
>>> and it appears that clang is fine, while gcc is not.  That presents a
>>> bit of a portability issue for me (clang is SLOW!), I'll need to
>>> consider the implications.
>>>
>>> - Nigel
>>>
>>> On Wed, Jul 3, 2013 at 1:06 PM, Jeff Bland <jksb at linux.com> wrote:
>>>>
>>>> Surprised it loaded in Xcode 3.1 since the project format is
>>>> 3.2-compatable.
>>>>
>>>> Apparently the GCC 4.2 that shipped with Xcode doesn't support thread
>>>> local
>>>> storage on x86_64. You could try deleting the __thread bit on that line
>>>> as a
>>>> temporary workaround, but it should work in a recent Xcode w/ clang. When
>>>> you tried the current Xcode, did you use clang, and did you get a similar
>>>> error?
>>>>
>>>> I noticed an unrelated link error as well, the Xcode project is missing
>>>> src/waffle/core/wcore_attrib_list.c, I'll send in a patch for that.
>>>>
>>>> On Wed, Jul 3, 2013 at 11:27 AM, Nigel Stewart <nigels.com at gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I came across something a bit mysterious on the Mac just now.
>>>>> Using cmake and gcc from MacPorts, Waffle builds just fine.
>>>>> However, building with XCode gcc...
>>>>>
>>>>> src/waffle/src/core/wcore_tinfo.c
>>>>> src/waffle/src/core/wcore_tinfo.c:56: error: thread-local storage not
>>>>> supported for this target
>>>>> src/waffle/src/core/wcore_tinfo.c:56: warning: ‘tls_model’ attribute
>>>>> ignored
>>>>>
>>>>> The complete command-line is:
>>>>>
>>>>> ccache  /XCode3.1.4/usr/bin/gcc-4.2 --std=c99 -no-cpp-precomp -dynamic
>>>>> -Wall -fvisibility=hidden -arch x86_64 -mmacosx-version-min=10.5
>>>>> -isysroot /XCode3.1.4/SDKs/MacOSX10.5.sdk    -I. -Isrc/waffle/include
>>>>> -Isrc/waffle/src/core -Isrc/waffle/src/api -Isrc/waffle/src/glx
>>>>> -Isrc/waffle/src/x11 -Isrc/waffle/src/linux -Isrc/waffle/src/egl  -g3
>>>>> -DDEBUG          -DWAFFLE_HAS_CGL -DWAFFLE_HAS_TLS_MODEL_INITIAL_EXEC
>>>>> -DFIXED_BYTE_ORDER      -DFIXED_BYTE_ORDER   -o
>>>>>
>>>>>
>>>>> ../nstewart-lion/sw/../../regal/built/wafflelib_Darwin_leopard_x86_64_debug/wcore_tinfo.o
>>>>> -c src/waffle/src/core/wcore_tinfo.c
>>>>> src/waffle/src/core/wcore_tinfo.c:56: error: thread-local storage not
>>>>> supported for this target
>>>>> src/waffle/src/core/wcore_tinfo.c:56: warning: ‘tls_model’ attribute
>>>>> ignored
>>>>>
>>>>> Using the current XCode doesn't seem to help either.
>>>>> Anyone else come across this?
>>>>>
>>>>> - Nigel
>>>>> _______________________________________________
>>>>> waffle mailing list
>>>>> waffle at lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/waffle
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> waffle mailing list
>>> waffle at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/waffle
>>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mac-Add-support-for-pre-10.6-Snow-Leopard-CGL.patch
Type: application/octet-stream
Size: 1370 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20130710/226e9dd4/attachment-0001.obj>


More information about the waffle mailing list