Re: centralize CPU feature detection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: centralize CPU feature detection
Date
Msg-id 4014992.1771963187@sss.pgh.pa.us
Whole thread Raw
In response to Re: centralize CPU feature detection  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: centralize CPU feature detection
List pgsql-hackers
John Naylor <johncnaylorls@gmail.com> writes:
> I've committed 0001.

BF animal rhinoceros isn't happy.  I can reproduce that locally by
doing

$ ./configure ... USE_SLICING_BY_8_CRC32C=1
$ make
...
pg_cpu_x86.c: In function 'pg_comp_crc32c_choose':
pg_cpu_x86.c:85:3: error: 'pg_comp_crc32c' undeclared (first use in this function); did you mean 'pg_comp_crc32c_sb8'?
   pg_comp_crc32c = pg_comp_crc32c_sse42;
   ^~~~~~~~~~~~~~
   pg_comp_crc32c_sb8
pg_cpu_x86.c:85:3: note: each undeclared identifier is reported only once for each function it appears in
pg_cpu_x86.c:85:20: error: 'pg_comp_crc32c_sse42' undeclared (first use in this function); did you mean
'pg_comp_crc32c_sb8'?
   pg_comp_crc32c = pg_comp_crc32c_sse42;
                    ^~~~~~~~~~~~~~~~~~~~
                    pg_comp_crc32c_sb8
pg_cpu_x86.c:108:9: warning: implicit declaration of function 'pg_comp_crc32c'; did you mean 'pg_comp_crc32c_sb8'?
[-Wimplicit-function-declaration]
  return pg_comp_crc32c(crc, data, len);
         ^~~~~~~~~~~~~~
         pg_comp_crc32c_sb8


It appears that if you want to build pg_cpu_x86.o unconditionally,
you need to make it more proof against the cases it wasn't getting
built in before.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: centralize CPU feature detection
Next
From: Peter Eisentraut
Date:
Subject: Re: Optimize SELECT * in EXISTS