Skip to content

Commit 16a5763

Browse files
authored
Merge pull request #164 from jayrm/bugfix-907
fix sf.net 907 bad C name mangling for global overloaded operators
2 parents dd24574 + 21d7f6f commit 16a5763

File tree

11 files changed

+814
-4
lines changed

11 files changed

+814
-4
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Version 1.07.0
5353
- fbc uses '-march=armv8-a' instead of invalid option '-march=aarch64' when passing options to gcc/LLVM (czsgaba)
5454
- rtlib: sys/io.h incorrectly included on systems that do not provide it. It is used only for x86, x86_64 and is unnecessary for all other linux targets (armhf ,arm64, mips ....)
5555
- SELECT CASE AS CONST checks for ranges that would produce unreasonably large jump tables (greater than 8192 entries)
56+
- sf.net #907: global overloaded operator procs need "_Z" mangling prefix
5657

5758

5859
Version 1.06.0

src/compiler/symb-mangling.bas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,8 @@ private sub hMangleProc( byval sym as FBSYMBOL ptr )
11951195
end if
11961196

11971197
'' C++ prefix
1198-
if( docpp ) then
1198+
'' global overloaded operators need the prefix
1199+
if( docpp or symbIsOperator( sym ) ) then
11991200
mangled += "_Z"
12001201
end if
12011202

tests/cpp/bop-cpp.cpp

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
// implementation for bop-fbc.bas
2+
3+
// each operation records call information
4+
// in static variables, and we use getters
5+
// to retrieve it back to fbc side
6+
7+
#define NULL 0
8+
static const void * ptr1 = NULL;
9+
static const void * ptr2 = NULL;
10+
static char msg1[100]; // check message
11+
static int val1 = 0; // current/lhs value
12+
static int val2 = 0; // rhs value
13+
static int val3 = 0; // result value
14+
15+
void setMsg( const char* msg ) {
16+
char *s = msg1;
17+
while( *msg )
18+
*s++ = *msg++;
19+
*s = *msg;
20+
}
21+
22+
void resetChecks() {
23+
ptr1 = NULL;
24+
ptr2 = NULL;
25+
setMsg( "" );
26+
}
27+
28+
const void* getPtr1() {
29+
return ptr1;
30+
}
31+
32+
const void* getPtr2() {
33+
return ptr2;
34+
}
35+
36+
char* getMsg1() {
37+
return msg1;
38+
}
39+
40+
int getVal1() {
41+
return val1;
42+
}
43+
44+
int getVal2() {
45+
return val2;
46+
}
47+
48+
int getVal3() {
49+
return val3;
50+
}
51+
52+
class UDT_DEFAULT
53+
{
54+
public:
55+
int value;
56+
};
57+
58+
// by default fbc will be stdcall on windows and cdecl on linux
59+
#ifdef __MINGW32__
60+
// warning !!! mingw specific
61+
#define FBCALL __attribute__((stdcall))
62+
#else
63+
#define FBCALL
64+
#endif
65+
66+
UDT_DEFAULT operator+( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
67+
UDT_DEFAULT operator-( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
68+
UDT_DEFAULT operator*( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
69+
UDT_DEFAULT operator/( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
70+
UDT_DEFAULT operator%( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
71+
UDT_DEFAULT operator<<( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
72+
UDT_DEFAULT operator>>( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
73+
UDT_DEFAULT operator&( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
74+
UDT_DEFAULT operator|( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
75+
UDT_DEFAULT operator^( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) FBCALL;
76+
77+
class UDT_C_DEFAULT
78+
{
79+
public:
80+
int value;
81+
};
82+
83+
extern "C" {
84+
UDT_C_DEFAULT operator+( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
85+
UDT_C_DEFAULT operator-( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
86+
UDT_C_DEFAULT operator*( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
87+
UDT_C_DEFAULT operator/( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
88+
UDT_C_DEFAULT operator%( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
89+
UDT_C_DEFAULT operator<<( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
90+
UDT_C_DEFAULT operator>>( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
91+
UDT_C_DEFAULT operator&( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
92+
UDT_C_DEFAULT operator|( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
93+
UDT_C_DEFAULT operator^( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs );
94+
}
95+
96+
class UDT_CPP_DEFAULT
97+
{
98+
public:
99+
int value;
100+
};
101+
102+
UDT_CPP_DEFAULT operator+( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
103+
UDT_CPP_DEFAULT operator-( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
104+
UDT_CPP_DEFAULT operator*( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
105+
UDT_CPP_DEFAULT operator/( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
106+
UDT_CPP_DEFAULT operator%( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
107+
UDT_CPP_DEFAULT operator<<( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
108+
UDT_CPP_DEFAULT operator>>( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
109+
UDT_CPP_DEFAULT operator&( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
110+
UDT_CPP_DEFAULT operator|( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
111+
UDT_CPP_DEFAULT operator^( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs );
112+
113+
#define exec_bop( t, bop ) \
114+
t ret = {0}; \
115+
ptr1 = &lhs; \
116+
ptr2 = &rhs; \
117+
setMsg( #t " operator" #bop ); \
118+
val1 = lhs.value; \
119+
val2 = rhs.value; \
120+
val3 = lhs.value bop rhs.value; \
121+
ret.value = lhs.value bop rhs.value; \
122+
return ret;
123+
124+
// default mangling (on fbc side), default calling convention
125+
126+
UDT_DEFAULT operator+( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, + ) }
127+
UDT_DEFAULT operator-( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, - ) }
128+
UDT_DEFAULT operator*( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, * ) }
129+
UDT_DEFAULT operator/( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, / ) }
130+
UDT_DEFAULT operator%( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, % ) }
131+
UDT_DEFAULT operator<<( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, << ) }
132+
UDT_DEFAULT operator>>( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, >> ) }
133+
UDT_DEFAULT operator&( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, & ) }
134+
UDT_DEFAULT operator|( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, | ) }
135+
UDT_DEFAULT operator^( UDT_DEFAULT const& lhs, UDT_DEFAULT const& rhs ) { exec_bop( UDT_DEFAULT, ^ ) }
136+
137+
// C mangling (on fbc side), default calling convention
138+
extern "C" {
139+
UDT_C_DEFAULT operator+( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ){exec_bop( UDT_C_DEFAULT, + ) }
140+
UDT_C_DEFAULT operator-( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, - ) }
141+
UDT_C_DEFAULT operator*( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, * ) }
142+
UDT_C_DEFAULT operator/( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, / ) }
143+
UDT_C_DEFAULT operator%( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, % ) }
144+
UDT_C_DEFAULT operator<<( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, << ) }
145+
UDT_C_DEFAULT operator>>( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, >> ) }
146+
UDT_C_DEFAULT operator&( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, & ) }
147+
UDT_C_DEFAULT operator|( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, | ) }
148+
UDT_C_DEFAULT operator^( UDT_C_DEFAULT const& lhs, UDT_C_DEFAULT const& rhs ) { exec_bop( UDT_C_DEFAULT, ^ ) }
149+
} // extern "C"
150+
151+
// c++ mangling (on fbc side), default calling convention
152+
153+
UDT_CPP_DEFAULT operator+( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, + ) }
154+
UDT_CPP_DEFAULT operator-( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, - ) }
155+
UDT_CPP_DEFAULT operator*( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, * ) }
156+
UDT_CPP_DEFAULT operator/( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, / ) }
157+
UDT_CPP_DEFAULT operator%( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, % ) }
158+
UDT_CPP_DEFAULT operator<<( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, << ) }
159+
UDT_CPP_DEFAULT operator>>( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, >> ) }
160+
UDT_CPP_DEFAULT operator&( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, & ) }
161+
UDT_CPP_DEFAULT operator|( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, | ) }
162+
UDT_CPP_DEFAULT operator^( UDT_CPP_DEFAULT const& lhs, UDT_CPP_DEFAULT const& rhs ) { exec_bop( UDT_CPP_DEFAULT, ^ ) }

tests/cpp/bop-fbc.bas

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
' TEST_MODE : MULTI_MODULE_TEST
2+
3+
'' test mapping of mangling and calling convention
4+
'' of global overloaded operators
5+
'' between c/c++ and fbc
6+
7+
'' helper macro to track progress
8+
#define DLOG( msg ) '' print #msg
9+
10+
extern "c++"
11+
'' getters to retrieve call information
12+
'' from the c++ side
13+
declare sub resetChecks()
14+
declare function getPtr1() as any ptr
15+
declare function getPtr2() as any ptr
16+
declare function getMsg1() as zstring ptr
17+
declare function getVal1() as long
18+
declare function getVal2() as long
19+
declare function getVal3() as long
20+
end extern
21+
22+
'' default mangling, default calling convention
23+
type UDT_DEFAULT
24+
value as long
25+
end type
26+
27+
'' fbc will mangle a @N suffix by default
28+
declare operator +( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
29+
declare operator -( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
30+
declare operator *( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
31+
declare operator /( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
32+
declare operator mod( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
33+
declare operator shl( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
34+
declare operator shr( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
35+
declare operator and( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
36+
declare operator or ( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
37+
declare operator xor( byref lhs as const UDT_DEFAULT, byref rhs as const UDT_DEFAULT ) as UDT_DEFAULT
38+
39+
40+
'' extern "c", default calling convention
41+
type UDT_C_DEFAULT
42+
value as long
43+
end type
44+
45+
extern "c"
46+
declare operator +( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
47+
declare operator -( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
48+
declare operator *( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
49+
declare operator /( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
50+
declare operator mod( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
51+
declare operator shl( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
52+
declare operator shr( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
53+
declare operator and( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
54+
declare operator or ( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
55+
declare operator xor( byref lhs as const UDT_C_DEFAULT, byref rhs as const UDT_C_DEFAULT ) as UDT_C_DEFAULT
56+
end extern
57+
58+
59+
'' extern "c++", default calling convention
60+
type UDT_CPP_DEFAULT
61+
value as long
62+
end type
63+
64+
extern "c++"
65+
declare operator +( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
66+
declare operator -( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
67+
declare operator *( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
68+
declare operator /( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
69+
declare operator mod( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
70+
declare operator shl( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
71+
declare operator shr( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
72+
declare operator and( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
73+
declare operator or ( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
74+
declare operator xor( byref lhs as const UDT_CPP_DEFAULT, byref rhs as const UDT_CPP_DEFAULT ) as UDT_CPP_DEFAULT
75+
end extern
76+
77+
#macro chkbop( op, t, m1, arg1, arg2, result )
78+
DLOG( n )
79+
resetChecks()
80+
scope
81+
dim a as t = ( arg1 )
82+
dim b as t = ( arg2 )
83+
dim r as t
84+
r = a op b
85+
assert( m1 = *getMsg1() )
86+
assert( @a = getPtr1() )
87+
assert( @b = getPtr2() )
88+
assert( r.value = result )
89+
assert( r.value = getVal3() )
90+
end scope
91+
#endmacro
92+
93+
chkbop( +, UDT_DEFAULT, "UDT_DEFAULT operator+", 5, 7, 12 )
94+
chkbop( -, UDT_DEFAULT, "UDT_DEFAULT operator-", 5, 7, -2 )
95+
chkbop( *, UDT_DEFAULT, "UDT_DEFAULT operator*", 5, 7, 35 )
96+
chkbop( /, UDT_DEFAULT, "UDT_DEFAULT operator/", 35, 7, 5 )
97+
chkbop( mod, UDT_DEFAULT, "UDT_DEFAULT operator%", 16, 5, 1 )
98+
chkbop( shl, UDT_DEFAULT, "UDT_DEFAULT operator<<", 16, 2, 64 )
99+
chkbop( shr, UDT_DEFAULT, "UDT_DEFAULT operator>>", 16, 2, 4 )
100+
chkbop( and, UDT_DEFAULT, "UDT_DEFAULT operator&", &b1100, &b1010, &b1000 )
101+
chkbop( or , UDT_DEFAULT, "UDT_DEFAULT operator|", &b1100, &b1010, &b1110 )
102+
chkbop( xor, UDT_DEFAULT, "UDT_DEFAULT operator^", &b1100, &b1010, &b0110 )
103+
104+
chkbop( +, UDT_C_DEFAULT, "UDT_C_DEFAULT operator+", 5, 7, 12 )
105+
chkbop( -, UDT_C_DEFAULT, "UDT_C_DEFAULT operator-", 5, 7, -2 )
106+
chkbop( *, UDT_C_DEFAULT, "UDT_C_DEFAULT operator*", 5, 7, 35 )
107+
chkbop( /, UDT_C_DEFAULT, "UDT_C_DEFAULT operator/", 35, 7, 5 )
108+
chkbop( mod, UDT_C_DEFAULT, "UDT_C_DEFAULT operator%", 16, 5, 1 )
109+
chkbop( shl, UDT_C_DEFAULT, "UDT_C_DEFAULT operator<<", 16, 2, 64 )
110+
chkbop( shr, UDT_C_DEFAULT, "UDT_C_DEFAULT operator>>", 16, 2, 4 )
111+
chkbop( and, UDT_C_DEFAULT, "UDT_C_DEFAULT operator&", &b1100, &b1010, &b1000 )
112+
chkbop( or , UDT_C_DEFAULT, "UDT_C_DEFAULT operator|", &b1100, &b1010, &b1110 )
113+
chkbop( xor, UDT_C_DEFAULT, "UDT_C_DEFAULT operator^", &b1100, &b1010, &b0110 )
114+
115+
chkbop( +, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator+", 5, 7, 12 )
116+
chkbop( -, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator-", 5, 7, -2 )
117+
chkbop( *, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator*", 5, 7, 35 )
118+
chkbop( /, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator/", 35, 7, 5 )
119+
chkbop( mod, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator%", 16, 5, 1 )
120+
chkbop( shl, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator<<", 16, 2, 64 )
121+
chkbop( shr, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator>>", 16, 2, 4 )
122+
chkbop( and, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator&", &b1100, &b1010, &b1000 )
123+
chkbop( or , UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator|", &b1100, &b1010, &b1110 )
124+
chkbop( xor, UDT_CPP_DEFAULT, "UDT_CPP_DEFAULT operator^", &b1100, &b1010, &b0110 )

tests/cpp/bop.bmk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# TEST_MODE : MULTI_MODULE_OK
2+
3+
MAIN := bop-fbc.bas
4+
SRCS :=
5+
6+
EXTRA_OBJS := bop-cpp.o
7+
8+
$(SRCDIR)bop-cpp.o : $(SRCDIR)bop-cpp.cpp
9+
# Pass $(CFLAGS) to get -m32 or -m64 as required
10+
$(CXX) -c $(CFLAGS) -o $@ $^

0 commit comments

Comments
 (0)