This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/20723] Static linking fails on Haswell and Sandy Bridge


https://sourceware.org/bugzilla/show_bug.cgi?id=20723

--- Comment #1 from rlcamp.pdx at gmail dot com ---
The following code example and compile line triggers the error. Code is taken
verbatim from the glibc wiki:

#include <math.h>

int N = 3200;
double b[3200];
double a[3200];

int main (void)
{
  int i;

  for (i = 0; i < N; i += 1)
  {
    b[i] = sin (a[i]);
  }

  return (0);
}

cc -static -Ofast -march=haswell -o test test.c -lm
/tmp/ccIWFVL3.o: In function `main':
test.c:(.text.startup+0x14a): undefined reference to `_ZGVdN4v_sin'
collect2: error: ld returned 1 exit status

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]