Skip to contentSkip to conversation

uclibc and uclibc-locale support in gcc 4.3.1

DISCUSSION Khem Raj 3 participants 8 messages Aug 20, 2008 – Aug 21, 2008

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

Hi

I was trying to use gcc 4.3 for some uclibc stuff and found it broken. This patch fixes it.

1. Fix target gcc build. The earlier patch I did to fix SDK build was insufficient so I enhanced it.

2. uclibc Locale patches needed a facelift to be able to work with gcc 4.3

3. Fix uclibc 0.9.29 to get build using gcc 4.3

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

I intend to apply it on .dev. comments are welcome

I have tested it on arm uclibc and arm eglibc doing bitbake gcc

Thx

-Khem

#1 lore raw
Quoted 12 lines · Khem Raj

Hi

I was trying to use gcc 4.3 for some uclibc stuff and found it broken. This patch fixes it.

1. Fix target gcc build. The earlier patch I did to fix SDK build was insufficient so I enhanced it.

2. uclibc Locale patches needed a facelift to be able to work with gcc 4.3

3. Fix uclibc 0.9.29 to get build using gcc 4.3

Quoted 7 lines

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

I intend to apply it on .dev. comments are welcome

I have tested it on arm uclibc and arm eglibc doing bitbake gcc

Your patch has

+OBJC ?= ",objc"
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC_avr ?= ""

That probably needs to be:

+OBJC_avr32 ?= ""
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC ?= ",objc"

Note the '32' in avr32 and the order of weak assignments.

regards,

Koen

author
#2 lore raw

Hi Koen

Thanks for looking at it. While I see that what you mention is logical. The construct I have worked ok on uclibc and eglibc angstrom builds. But I will change to what you suggested and do builds again.

Thanks

-Khem

Quoted 46 lines · Koen Kooi
Quoted 13 lines · Khem Raj

Hi

I was trying to use gcc 4.3 for some uclibc stuff and found it broken. This patch fixes it.

1. Fix target gcc build. The earlier patch I did to fix SDK build was insufficient so I enhanced it.

2. uclibc Locale patches needed a facelift to be able to work with gcc 4.3

3. Fix uclibc 0.9.29 to get build using gcc 4.3

Quoted 7 lines

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

I intend to apply it on .dev. comments are welcome

I have tested it on arm uclibc and arm eglibc doing bitbake gcc

Your patch has

(quoted diff) +3 -0
+OBJC ?= ",objc"
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC_avr ?= ""

That probably needs to be:

(quoted diff) +3 -0
+OBJC_avr32 ?= ""
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC ?= ",objc"

Note the '32' in avr32 and the order of weak assignments.

regards,

Koen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 5 lines · Khem Raj

Hi Koen

Thanks for looking at it. While I see that what you mention is logical. The construct I have worked ok on uclibc and eglibc angstrom builds. But I will change to what you suggested and do builds again.

I suspect we've hit a feature of bitbake again:

FOO = "bar"
FOO_xyz ?= "baz"

=> FOO is now baz

FOO_xyz = "bar"
FOO_xyz ?= "baz"

=> FOO is now bar

I still think this is a bug and depending on it would not be a good idea :)

regards,

Koen

Quoted 50 lines

Thanks

-Khem

Quoted 44 lines · Koen Kooi
Quoted 12 lines · Khem Raj

Hi

I was trying to use gcc 4.3 for some uclibc stuff and found it broken. This patch fixes it.

1. Fix target gcc build. The earlier patch I did to fix SDK build was insufficient so I enhanced it.

2. uclibc Locale patches needed a facelift to be able to work with gcc 4.3

3. Fix uclibc 0.9.29 to get build using gcc 4.3

Quoted 7 lines

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

I intend to apply it on .dev. comments are welcome

I have tested it on arm uclibc and arm eglibc doing bitbake gcc

Your patch has

(quoted diff) +3 -0
+OBJC ?= ",objc"
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC_avr ?= ""

That probably needs to be:

(quoted diff) +3 -0
+OBJC_avr32 ?= ""
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC ?= ",objc"

Note the '32' in avr32 and the order of weak assignments.

regards,

Koen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#4 lore raw
Quoted 12 lines · Koen Kooi
Quoted 5 lines · Khem Raj

Hi Koen

Thanks for looking at it. While I see that what you mention is logical. The construct I have worked ok on uclibc and eglibc angstrom builds. But I will change to what you suggested and do builds again.

I suspect we've hit a feature of bitbake again:

FOO = "bar"
FOO_xyz ?= "baz"

Quoted 8 lines

=> FOO is now baz

FOO_xyz = "bar"
FOO_xyz ?= "baz"

=> FOO is now bar

I still think this is a bug and depending on it would not be a good idea :)

I'm not exactly clear on what you think is a bug. You're right that the above sequence of assignments would result in FOO = "bar", irrespective of whether xyz is in OVERRIDES or not, but I can't see any obvious way in which this behaviour deviates from either what's expected or what's documented in the manual.

The important thing to remember about how bitbake processes these assignments is that, at the parser level, a line like 'FOO_xyz = "bar"' is no different from any other variable assignment: it literally does create a variable called FOO_xyz and give it the value bar. At this stage there is no linkage between FOO_xyz and FOO. In the same way, FOO_${PN} and FOO_xyz are distinct variables, even if it happens to be true that PN = xyz.

So, an operation like FOO_xyz ?= "baz" does not mean "set FOO to baz if xyz is true and FOO is previously unset". It simply means "set FOO_xyz to baz if FOO_xyz was previously unset": again, there is no consideration of the state of FOO or any other variable.

All the overrides are processed in one block once the entire file has been parsed. This is the reason that the ordering between the assignments to FOO_xyz and FOO is unimportant: the only thing that the override processor cares about is the state of the metadata at the end of parsing, not any intermediate state that it might have been in earlier. At this point, if the expansion of OVERRIDES includes "xyz", the override processor will collapse FOO_xyz into FOO, overwriting the value of the latter with the value of the former. This operation is independent of the strong/weak status of any previous assignments to those variables.

p.

#5 lore raw
In reply to Koen Kooi
Quoted 12 lines · Koen Kooi

Your patch has

(quoted diff) +3 -0
+OBJC ?= ",objc"
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC_avr ?= ""

That probably needs to be:

(quoted diff) +3 -0
+OBJC_avr32 ?= ""
+OBJC_linux-uclibcgnueabi ?= ""
+OBJC ?= ",objc"
Quoted 1 line

Note the '32' in avr32 and the order of weak assignments.

You're probably correct about avr/avr32, but the order of the assignments is immaterial here.

I think what Khem actually wanted was a weak conditional assignment, but unfortunately bitbake doesn't have such an operator (or, indeed, true conditional assignments of any kind). The only way to get that behaviour is to write it as an anonymous python function, which is doable but somewhat tedious.

p.

#6 lore raw
In reply to Khem Raj
Quoted 3 lines · Khem Raj

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

Actually you seem to be disabling both libobjc and the Objective-C compiler itself for all uclibc systems, not just ARM. Is that what you wanted?

p.

author
#7 lore raw
Quoted 8 lines · Phil Blundell
Quoted 3 lines · Khem Raj

4. Disable libobjc for arm uclibc. If someone really needs some packages on uclibc which need objc support then you better fix gcc first :)

Actually you seem to be disabling both libobjc and the Objective-C compiler itself for all uclibc systems, not just ARM. Is that what you wanted?

Yes because I saw it failing for x86 uclibc as well.

Quoted 10 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel