Project

General

Profile

Actions

Bug #1710

closed

gcc 4.1.2 on x86_64 undefined reference __udivti3 for __uint128_t division

Added by davshao over 14 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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 (204 Bytes) div128.c davshao, 03/30/2010 04:21 PM
Actions

Also available in: Atom PDF