Bug #1345
closed[PATCH]
0%
Description
The following patch adds a bias to all ASSYM symbols that later is ignored by
genassym, as genassym only takes the last 4 digits.
This fixes two major compilation issues with llvm/clang, regarding:
1) lib/libc
2) make depend on sys
http://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commit/5ebe390060e08aff3977372d0e49a1217ea20971
Updated by corecode over 15 years ago
This is a seriously nasty hack. The very least it needs to be integrated with
genassym.sh
Updated by alexh over 15 years ago
As can be seen below, it is already integrated into genassym.sh by means of
"substr($1, length($1) - 3, 4)", which only takes the last 4 digits of that
substring.
=========================================================
Excerpt from CURRENT sys/kern/genassym.sh
=========================================================
/ C .*sign$/ {
sign = substr($1, length($1) - 3, 4)
sub("^0*", "", sign)
if (sign != "")
sign = "-"
}
/ C .*w0$/ {
w0 = substr($1, length($1) - 3, 4)
}
/ C .*w1$/ {
w1 = substr($1, length($1) - 3, 4)
}
/ C .*w2$/ {
w2 = substr($1, length($1) - 3, 4)
}
/ C .*w3$/ {
w3 = substr($1, length($1) - 3, 4)
=========================================================
Updated by alexh over 15 years ago
Updated (only commit message changed):
http://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commit/75a84cbe6c8f683b17afeada45dcd1871a262ed3
Updated by dillon over 15 years ago
:New submission from Alex Hornung <ahornung@gmail.com>:
:
:The following patch adds a bias to all ASSYM symbols that later is ignored =
:by
:genassym, as genassym only takes the last 4 digits.
:This fixes two major compilation issues with llvm/clang, regarding:
:1) lib/libc
:2) make depend on sys
:
:http://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commit/5ebe390060e08aff=
:3977372d0e49a1217ea20971
I'm awfully confused. Is something using those array definitions in C?
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by dillon over 15 years ago
:
:Alex Hornung <ahornung@gmail.com> added the comment:
:
:As can be seen below, it is already integrated into genassym.sh by means of
:"substr($1, length($1) - 3, 4)", which only takes the last 4 digits of that
:substring.
I think what needs to be done here is to get rid of the hack entirely
and change genassym.sh over to the type of genassym.c generator we
use for the kernel.
-Matt
Updated by dillon over 15 years ago
Ok, after Alex and I did a lot of messing around we came to the
conclusion that the offset hack is the way to go, at least for now.
The basic problem is that we can't generate proper structure sizes
using the NX mechanism when in a cross-build environment. The only
way to do it is to use the cross-built compiler to generate an
object module and then extract the offsets using nm or objdump.
So for now we will go with the offset hack and retain the nm/awk
stuff.
-Matt