DragonFly BSD
DragonFly bugs List (threaded) for 2010-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1710] gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division


From: "David Shao \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Mar 2010 16:21:34 +0000

New submission from David Shao <davshao@gmail.com>:

pkgsrc gstreamer0.10 fails to build on
DragonFly  2.7-DEVELOPMENT DragonFly v2.7.0.4.g63c2a-DEVELOPMENT #11: Mon Mar 29
07:30:32 PDT 2010     root@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

due to default gcc 4.1.2 not being able to handle code similar to that from
/usr/pkgsrc/multimedia/gstreamer0.10/work/gstreamer-0.10.28/gst/gstutils.c:

#include <inttypes.h>
#include <stdio.h>

int main(void)
{
  __uint128_t num = 1000;
  __uint128_t denom = 10;
  __uint128_t res = num / denom;
  printf("Result = %ju\n", (uintmax_t)res); 
  return 0;
}

$ gcc div128.c
/tmp//ccHUakkJ.o: In function `main':
div128.c:(.text+0x39): undefined reference to `__udivti3'
$ CCVER=gcc44 gcc -Wall -Werror div128.c
$ ./a.out
Result = 100

Using CCVER=gcc44 before pkgsrc bmake allows gstreamer0.10 and thus xfce4 to
build and run on x86_64.

----------
files: div128.c
keyword: libc, pkgsrc
messages: 8326
nosy: davshao
status: unread
title: gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1710>
_____________________________________________________

Attachment: div128.c
Description: Binary data



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]