Date: Sat, 17 Jun 2017 01:29:19 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 220024] head -r319991 clang powerpc64 and powerpc toolchains (cross build target): boot1.o: In function `fsread_size': undefined reference to `__udivdi3' (INO64 involved) Message-ID: <bug-220024-8-8jc4cq4OPl@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-220024-8@https.bugs.freebsd.org/bugzilla/> References: <bug-220024-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220024 Mark Millard <markmi@dsl-only.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|head -r319991 clang |head -r319991 clang |powerpc64 and powerpc |powerpc64 and powerpc |toolchains (cross build |toolchains (cross build |target): boot1.o: In |target): boot1.o: In |function `fsread_size': |function `fsread_size': |undefined reference to |undefined reference to |`__udivdi3' |`__udivdi3' (INO64 | |involved) --- Comment #4 from Mark Millard <markmi@dsl-only.net> --- Turns out clang is generating the __udivdi3 references because of the INO64 changes being involved in fsread_size --at least if I understand right. And that explains why this was not a problem in the likes of -r317820 (before INO64). For reference: part of a note that I sent out on the lists. . . buildworld via clang for powerpc64 and powerpc fails for lack of `__udivdi3' referenced in sys/boot/common/ufsread.c fsread_size code. But this lead to me looking around and I found a conceptually separate possible issue. . . sys/sys/_types.h : typedef __uint64_t __ino_t; /* inode number */ # find /usr/src/sys/ -exec grep __ino_t {} \; -print | more typedef __ino_t ino_t; /usr/src/sys/sys/stat.h typedef __ino_t ino_t; /* inode number */ /usr/src/sys/sys/types.h typedef __uint64_t __ino_t; /* inode number */ /usr/src/sys/sys/_types.h typedef __ino_t ino_t; /usr/src/sys/sys/dirent.h sys/boot/common/ufsread.c : . . . #include <ufs/ufs/dinode.h> #include <ufs/ufs/dir.h> #include <ufs/ffs/fs.h> . . . typedef uint32_t ufs_ino_t; . . . Note the 32-bit type above. The headers included have use of the 64-bit ino_t type as well, for example: sys/ufs/ufs/diniode.h : . . . #define UFS_ROOTINO ((ino_t)2) . . . #define UFS_WINO ((ino_t)1) . . . sys/ufs/ffs/fs.h : . . . #define ino_to_cg(fs, x) (((ino_t)(x)) / (fs)->fs_ipg) #define ino_to_fsba(fs, x) \ ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, (ino_t)(x))) + \ (blkstofrags((fs), ((((ino_t)(x)) % (fs)->fs_ipg) / INOPB(fs))))= )) #define ino_to_fsbo(fs, x) (((ino_t)(x)) % INOPB(fs)) . . . I believe the powerpc64/powerpc issue gives evidence of ino_t being used in addition to ufs_ino_t in sys/boot/common/ufsread.c 's fsread_size . --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-220024-8-8jc4cq4OPl>