Could you try the attached patch? I some sense it adds an odd logic, but it might just work around pgcc's crazyness.
Samuel
Index: src/topology-linux.c =================================================================== --- src/topology-linux.c (révision 2420) +++ src/topology-linux.c (copie de travail) @@ -23,7 +23,7 @@ #include <sched.h> #include <pthread.h> -#ifndef HWLOC_HAVE_CPU_SET +#if !defined(HWLOC_HAVE_CPU_SET) && !(defined(HWLOC_HAVE_CPU_SET_S) && !defined(HWLOC_HAVE_OLD_SCHED_SETAFFINITY)) /* libc doesn't have support for sched_setaffinity, build system call * ourselves: */ # include <linux/unistd.h>