Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf0c248

Browse files
committed
Use function attributes for SSE 4.2 even when targeting that extension
On Red Hat 9 systems (or similar), the packaged gcc targets x86-64-v2,but clang does not. This has caused build failures in the wake ofcommite2809e3 when building --with-llvm.The most expedient fix is to use the same function attributes forthe inlined function as we do for the global function.Reported-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> (plus members skimmer and bumblebee)Diagnosed-by: Tom Lane <tgl@sss.pgh.pa.us>Tested-by: Todd Cook <cookt@blackduck.com>Discussion:https://postgr.es/m/CANWCAZZSxs3a1YRKehkgk2OHKbrVn+xZ+AWW8Co2R_f70NqqmA@mail.gmail.com
1 parent3dbdf86 commitaf0c248

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/include/port/pg_crc32c.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ typedef uint32 pg_crc32c;
5252

5353
externpg_crc32cpg_comp_crc32c_sse42(pg_crc32ccrc,constvoid*data,size_tlen);
5454

55+
/*
56+
* We can only get here if the host compiler targets SSE 4.2, but on some
57+
* systems gcc and clang don't have the same built-in targets, so we still
58+
* must use a function attribute here to accommodate "--with-llvm" builds.
59+
*/
5560
pg_attribute_no_sanitize_alignment()
61+
pg_attribute_target("sse4.2")
5662
staticinline
5763
pg_crc32c
5864
pg_comp_crc32c_dispatch(pg_crc32ccrc,constvoid*data,size_tlen)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp