[Bug 1083962] Review Request: maxscale - A database-centric proxy that works with MariaDB and MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1083962



--- Comment #11 from Paulo Andrade <paulo.cesar.pereira.de.andrade@xxxxxxxxx> ---
(In reply to Christopher Meng from comment #10)
> 1. LDFLAGS? Try %{__global_ldflags} macro.
> 
> 2. MaxScale is an open-source, database-centric proxy that works with
> MariaDB and
> MySQL
> 
> Dot should be at the end, right?
> 
> 3. Do you manage your software with no configure system? I hope you can
> persuade someone to do that(CMake or autocrap, up to you :)
> 
> --------------------ARM--------------------
> 
> Error output:
> 
> skygw_utils.cc: In function 'int atomic_add(int*, int)':
> skygw_utils.cc:144:15: error: impossible constraint in 'asm'
>    : "memory" );
> 
> Code block:
> 
> int atomic_add(
>         int *variable,
>         int value)
> {
> 	asm volatile(
> 		"lock; xaddl %%eax, %2;"
> 		:"=a" (value)
> 		: "a" (value), "m" (*variable)
> 		: "memory" );
> 	return value;
> }
> 
> Looks like it used some special hacks to suppress the compiler? I think that
> volatile may bring some drastic effects to ARM platform.

This looks bad.
$ grep -r atomic_add maxscale-0.5.0/ | wc -l
68
$ grep -l -r atomic_add maxscale-0.5.0|wc -l
18
Used 68 times in 18 files.

The problem obviously is that it is ix86/x86_64 code.
For arm AFAIK there are two way to implement it in asm,
depending on if using arm or thumb instruction set. But
the proper solution would be using gcc __atomic_add_fetch,
untested should be to rewrite atomic_add body as:

__atomic_add_fetch(variable, value, MEMMODEL_ACQ_REL);

but this is "relatively" new, for gcc4 family it was named

__sync_fetch_and_add.

Obviously could make it conditional and only support other
architectures if using a gcc new enough that supports it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]