mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
[BUILD] only enable regparm on x86 to avoid useless warnings
It complains at least on Solaris/sparc64 and OpenBSD/vax.
This commit is contained in:
parent
1a587498e8
commit
390223bc32
4
Makefile
4
Makefile
@ -57,8 +57,8 @@ LIBS.solaris = -lnsl -lsocket
|
|||||||
|
|
||||||
# CPU dependant optimizations
|
# CPU dependant optimizations
|
||||||
COPTS.generic = -O2
|
COPTS.generic = -O2
|
||||||
COPTS.i586 = -O2 -march=i586
|
COPTS.i586 = -O2 -march=i586 -DCONFIG_HAP_USE_REGPARM
|
||||||
COPTS.i686 = -O2 -march=i686
|
COPTS.i686 = -O2 -march=i686 -DCONFIG_HAP_USE_REGPARM
|
||||||
COPTS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc
|
COPTS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc
|
||||||
|
|
||||||
# options for standard regex library
|
# options for standard regex library
|
||||||
|
@ -47,18 +47,18 @@
|
|||||||
*/
|
*/
|
||||||
//#undef CONFIG_HAP_INLINE_FD_SET
|
//#undef CONFIG_HAP_INLINE_FD_SET
|
||||||
|
|
||||||
/* CONFIG_HAP_DISABLE_REGPARM
|
/* CONFIG_HAP_USE_REGPARM
|
||||||
* This disables the use of register parameters for some functions which
|
* This enables the use of register parameters for some functions where
|
||||||
* use it by default to increase performance.
|
* it may improve performance by a measurable factor.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_HAP_DISABLE_REGPARM
|
#ifdef CONFIG_HAP_USE_REGPARM
|
||||||
#define REGPRM1
|
|
||||||
#define REGPRM2
|
|
||||||
#define REGPRM3
|
|
||||||
#else
|
|
||||||
#define REGPRM1 __attribute__((regparm(1)))
|
#define REGPRM1 __attribute__((regparm(1)))
|
||||||
#define REGPRM2 __attribute__((regparm(2)))
|
#define REGPRM2 __attribute__((regparm(2)))
|
||||||
#define REGPRM3 __attribute__((regparm(3)))
|
#define REGPRM3 __attribute__((regparm(3)))
|
||||||
|
#else
|
||||||
|
#define REGPRM1
|
||||||
|
#define REGPRM2
|
||||||
|
#define REGPRM3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _COMMON_CONFIG_H */
|
#endif /* _COMMON_CONFIG_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user