• Linux aarch64交叉编译之glm数学库


    对于glm数学库 项目的交叉编译,该项目难度并不大。该文章的目标是编译一套aarch64 Linux Debian嵌入式版本上可以运行的版本库,基本无坑。老套路,先把linux桌面版搞好,然后 移植到嵌入式Linux Debian 板子上。

    1 glm简介

    为啥要搞这么数学库出来呢?OpenGl中在进行图形变换的时候需要使用几何数学库,GLM算是最常用的数学库了。同时兼容性也很好,为啥呢?因为OpenGL Mathematics (GLM) 是基于OpenGL着色语言(GLSL)规范的图形软件的头文件C ++数学库。也就是说 不用链接 静态库、动态库,直接包含hpp文件,然后编写代码就可以了。

    GLM提供的类和函数使用与GLSL相同的命名约定和功能设计和实现,因此使用GLSL的人都可以在C ++中使用GLM,当然 这个项目不限于GLSL的功能,还有一些扩展能力:矩阵变换,四元数,数据打包,随机数,噪声实现(使用计算机渲染精致的物体式非常的容易的,但在真实的世界中物体往往不是这样的,它们经常是带污渍、凹痕、磨损的,Ken Perlin在20世纪80年代进行了深入的研究,提出了一种直到现在也很有用的技术——噪声。噪声我们可以认为是一些无规律的数据,类似老电视机中没有信号时出现的随机的雪花像素点)等等。

    如果想了解更多,相关内容如下:

    2 Linux 本地编译 & 交叉编译

    2.1 Linux(ubuntu20.04)上glm的编译

    对于glm库来说,直接在ubuntu上编译还是很方便的,如下所示:

    1. $mkdir build
    2. $cd build
    3. $cmake ..
    4. $make
    5. $make DESTDIR=$PWD/out_x86_64 install

    最后生成内容为:

    1. ── usr
    2. └── local
    3. ├── include
    4. │   └── glm
    5. │   ├── common.hpp
    6. │   ├── detail
    7. │   │   ├── compute_common.hpp
    8. │   │   ├── compute_vector_relational.hpp
    9. │   │   ├── _features.hpp
    10. │   │   ├── _fixes.hpp
    11. │   │   ├── func_common.inl
    12. │   │   ├── func_common_simd.inl
    13. │   │   ├── func_exponential.inl
    14. │   │   ├── func_exponential_simd.inl
    15. │   │   ├── func_geometric.inl
    16. │   │   ├── func_geometric_simd.inl
    17. │   │   ├── func_integer.inl
    18. │   │   ├── func_integer_simd.inl
    19. │   │   ├── func_matrix.inl
    20. │   │   ├── func_matrix_simd.inl
    21. │   │   ├── func_packing.inl
    22. │   │   ├── func_packing_simd.inl
    23. │   │   ├── func_trigonometric.inl
    24. │   │   ├── func_trigonometric_simd.inl
    25. │   │   ├── func_vector_relational.inl
    26. │   │   ├── func_vector_relational_simd.inl
    27. │   │   ├── glm.cpp
    28. │   │   ├── _noise.hpp
    29. │   │   ├── qualifier.hpp
    30. │   │   ├── setup.hpp
    31. │   │   ├── _swizzle_func.hpp
    32. │   │   ├── _swizzle.hpp
    33. │   │   ├── type_float.hpp
    34. │   │   ├── type_half.hpp
    35. │   │   ├── type_half.inl
    36. │   │   ├── type_mat2x2.hpp
    37. │   │   ├── type_mat2x2.inl
    38. │   │   ├── type_mat2x3.hpp
    39. │   │   ├── type_mat2x3.inl
    40. │   │   ├── type_mat2x4.hpp
    41. │   │   ├── type_mat2x4.inl
    42. │   │   ├── type_mat3x2.hpp
    43. │   │   ├── type_mat3x2.inl
    44. │   │   ├── type_mat3x3.hpp
    45. │   │   ├── type_mat3x3.inl
    46. │   │   ├── type_mat3x4.hpp
    47. │   │   ├── type_mat3x4.inl
    48. │   │   ├── type_mat4x2.hpp
    49. │   │   ├── type_mat4x2.inl
    50. │   │   ├── type_mat4x3.hpp
    51. │   │   ├── type_mat4x3.inl
    52. │   │   ├── type_mat4x4.hpp
    53. │   │   ├── type_mat4x4.inl
    54. │   │   ├── type_mat4x4_simd.inl
    55. │   │   ├── type_quat.hpp
    56. │   │   ├── type_quat.inl
    57. │   │   ├── type_quat_simd.inl
    58. │   │   ├── type_vec1.hpp
    59. │   │   ├── type_vec1.inl
    60. │   │   ├── type_vec2.hpp
    61. │   │   ├── type_vec2.inl
    62. │   │   ├── type_vec3.hpp
    63. │   │   ├── type_vec3.inl
    64. │   │   ├── type_vec4.hpp
    65. │   │   ├── type_vec4.inl
    66. │   │   ├── type_vec4_simd.inl
    67. │   │   └── _vectorize.hpp
    68. │   ├── exponential.hpp
    69. │   ├── ext
    70. │   │   ├── matrix_clip_space.hpp
    71. │   │   ├── matrix_clip_space.inl
    72. │   │   ├── matrix_common.hpp
    73. │   │   ├── matrix_common.inl
    74. │   │   ├── matrix_double2x2.hpp
    75. │   │   ├── matrix_double2x2_precision.hpp
    76. │   │   ├── matrix_double2x3.hpp
    77. │   │   ├── matrix_double2x3_precision.hpp
    78. │   │   ├── matrix_double2x4.hpp
    79. │   │   ├── matrix_double2x4_precision.hpp
    80. │   │   ├── matrix_double3x2.hpp
    81. │   │   ├── matrix_double3x2_precision.hpp
    82. │   │   ├── matrix_double3x3.hpp
    83. │   │   ├── matrix_double3x3_precision.hpp
    84. │   │   ├── matrix_double3x4.hpp
    85. │   │   ├── matrix_double3x4_precision.hpp
    86. │   │   ├── matrix_double4x2.hpp
    87. │   │   ├── matrix_double4x2_precision.hpp
    88. │   │   ├── matrix_double4x3.hpp
    89. │   │   ├── matrix_double4x3_precision.hpp
    90. │   │   ├── matrix_double4x4.hpp
    91. │   │   ├── matrix_double4x4_precision.hpp
    92. │   │   ├── matrix_float2x2.hpp
    93. │   │   ├── matrix_float2x2_precision.hpp
    94. │   │   ├── matrix_float2x3.hpp
    95. │   │   ├── matrix_float2x3_precision.hpp
    96. │   │   ├── matrix_float2x4.hpp
    97. │   │   ├── matrix_float2x4_precision.hpp
    98. │   │   ├── matrix_float3x2.hpp
    99. │   │   ├── matrix_float3x2_precision.hpp
    100. │   │   ├── matrix_float3x3.hpp
    101. │   │   ├── matrix_float3x3_precision.hpp
    102. │   │   ├── matrix_float3x4.hpp
    103. │   │   ├── matrix_float3x4_precision.hpp
    104. │   │   ├── matrix_float4x2.hpp
    105. │   │   ├── matrix_float4x2_precision.hpp
    106. │   │   ├── matrix_float4x3.hpp
    107. │   │   ├── matrix_float4x3_precision.hpp
    108. │   │   ├── matrix_float4x4.hpp
    109. │   │   ├── matrix_float4x4_precision.hpp
    110. │   │   ├── matrix_int2x2.hpp
    111. │   │   ├── matrix_int2x2_sized.hpp
    112. │   │   ├── matrix_int2x3.hpp
    113. │   │   ├── matrix_int2x3_sized.hpp
    114. │   │   ├── matrix_int2x4.hpp
    115. │   │   ├── matrix_int2x4_sized.hpp
    116. │   │   ├── matrix_int3x2.hpp
    117. │   │   ├── matrix_int3x2_sized.hpp
    118. │   │   ├── matrix_int3x3.hpp
    119. │   │   ├── matrix_int3x3_sized.hpp
    120. │   │   ├── matrix_int3x4.hpp
    121. │   │   ├── matrix_int3x4_sized.hpp
    122. │   │   ├── matrix_int4x2.hpp
    123. │   │   ├── matrix_int4x2_sized.hpp
    124. │   │   ├── matrix_int4x3.hpp
    125. │   │   ├── matrix_int4x3_sized.hpp
    126. │   │   ├── matrix_int4x4.hpp
    127. │   │   ├── matrix_int4x4_sized.hpp
    128. │   │   ├── matrix_integer.hpp
    129. │   │   ├── matrix_integer.inl
    130. │   │   ├── matrix_projection.hpp
    131. │   │   ├── matrix_projection.inl
    132. │   │   ├── matrix_relational.hpp
    133. │   │   ├── matrix_relational.inl
    134. │   │   ├── matrix_transform.hpp
    135. │   │   ├── matrix_transform.inl
    136. │   │   ├── matrix_uint2x2.hpp
    137. │   │   ├── matrix_uint2x2_sized.hpp
    138. │   │   ├── matrix_uint2x3.hpp
    139. │   │   ├── matrix_uint2x3_sized.hpp
    140. │   │   ├── matrix_uint2x4.hpp
    141. │   │   ├── matrix_uint2x4_sized.hpp
    142. │   │   ├── matrix_uint3x2.hpp
    143. │   │   ├── matrix_uint3x2_sized.hpp
    144. │   │   ├── matrix_uint3x3.hpp
    145. │   │   ├── matrix_uint3x3_sized.hpp
    146. │   │   ├── matrix_uint3x4.hpp
    147. │   │   ├── matrix_uint3x4_sized.hpp
    148. │   │   ├── matrix_uint4x2.hpp
    149. │   │   ├── matrix_uint4x2_sized.hpp
    150. │   │   ├── matrix_uint4x3.hpp
    151. │   │   ├── matrix_uint4x3_sized.hpp
    152. │   │   ├── matrix_uint4x4.hpp
    153. │   │   ├── matrix_uint4x4_sized.hpp
    154. │   │   ├── quaternion_common.hpp
    155. │   │   ├── quaternion_common.inl
    156. │   │   ├── quaternion_common_simd.inl
    157. │   │   ├── quaternion_double.hpp
    158. │   │   ├── quaternion_double_precision.hpp
    159. │   │   ├── quaternion_exponential.hpp
    160. │   │   ├── quaternion_exponential.inl
    161. │   │   ├── quaternion_float.hpp
    162. │   │   ├── quaternion_float_precision.hpp
    163. │   │   ├── quaternion_geometric.hpp
    164. │   │   ├── quaternion_geometric.inl
    165. │   │   ├── quaternion_relational.hpp
    166. │   │   ├── quaternion_relational.inl
    167. │   │   ├── quaternion_transform.hpp
    168. │   │   ├── quaternion_transform.inl
    169. │   │   ├── quaternion_trigonometric.hpp
    170. │   │   ├── quaternion_trigonometric.inl
    171. │   │   ├── scalar_common.hpp
    172. │   │   ├── scalar_common.inl
    173. │   │   ├── scalar_constants.hpp
    174. │   │   ├── scalar_constants.inl
    175. │   │   ├── scalar_integer.hpp
    176. │   │   ├── scalar_integer.inl
    177. │   │   ├── scalar_int_sized.hpp
    178. │   │   ├── scalar_packing.hpp
    179. │   │   ├── scalar_packing.inl
    180. │   │   ├── scalar_reciprocal.hpp
    181. │   │   ├── scalar_reciprocal.inl
    182. │   │   ├── scalar_relational.hpp
    183. │   │   ├── scalar_relational.inl
    184. │   │   ├── scalar_uint_sized.hpp
    185. │   │   ├── scalar_ulp.hpp
    186. │   │   ├── scalar_ulp.inl
    187. │   │   ├── vector_bool1.hpp
    188. │   │   ├── vector_bool1_precision.hpp
    189. │   │   ├── vector_bool2.hpp
    190. │   │   ├── vector_bool2_precision.hpp
    191. │   │   ├── vector_bool3.hpp
    192. │   │   ├── vector_bool3_precision.hpp
    193. │   │   ├── vector_bool4.hpp
    194. │   │   ├── vector_bool4_precision.hpp
    195. │   │   ├── vector_common.hpp
    196. │   │   ├── vector_common.inl
    197. │   │   ├── vector_double1.hpp
    198. │   │   ├── vector_double1_precision.hpp
    199. │   │   ├── vector_double2.hpp
    200. │   │   ├── vector_double2_precision.hpp
    201. │   │   ├── vector_double3.hpp
    202. │   │   ├── vector_double3_precision.hpp
    203. │   │   ├── vector_double4.hpp
    204. │   │   ├── vector_double4_precision.hpp
    205. │   │   ├── vector_float1.hpp
    206. │   │   ├── vector_float1_precision.hpp
    207. │   │   ├── vector_float2.hpp
    208. │   │   ├── vector_float2_precision.hpp
    209. │   │   ├── vector_float3.hpp
    210. │   │   ├── vector_float3_precision.hpp
    211. │   │   ├── vector_float4.hpp
    212. │   │   ├── vector_float4_precision.hpp
    213. │   │   ├── vector_int1.hpp
    214. │   │   ├── vector_int1_sized.hpp
    215. │   │   ├── vector_int2.hpp
    216. │   │   ├── vector_int2_sized.hpp
    217. │   │   ├── vector_int3.hpp
    218. │   │   ├── vector_int3_sized.hpp
    219. │   │   ├── vector_int4.hpp
    220. │   │   ├── vector_int4_sized.hpp
    221. │   │   ├── vector_integer.hpp
    222. │   │   ├── vector_integer.inl
    223. │   │   ├── vector_packing.hpp
    224. │   │   ├── vector_packing.inl
    225. │   │   ├── vector_reciprocal.hpp
    226. │   │   ├── vector_reciprocal.inl
    227. │   │   ├── vector_relational.hpp
    228. │   │   ├── vector_relational.inl
    229. │   │   ├── vector_uint1.hpp
    230. │   │   ├── vector_uint1_sized.hpp
    231. │   │   ├── vector_uint2.hpp
    232. │   │   ├── vector_uint2_sized.hpp
    233. │   │   ├── vector_uint3.hpp
    234. │   │   ├── vector_uint3_sized.hpp
    235. │   │   ├── vector_uint4.hpp
    236. │   │   ├── vector_uint4_sized.hpp
    237. │   │   ├── vector_ulp.hpp
    238. │   │   └── vector_ulp.inl
    239. │   ├── ext.hpp
    240. │   ├── fwd.hpp
    241. │   ├── geometric.hpp
    242. │   ├── glm.hpp
    243. │   ├── gtc
    244. │   │   ├── bitfield.hpp
    245. │   │   ├── bitfield.inl
    246. │   │   ├── color_space.hpp
    247. │   │   ├── color_space.inl
    248. │   │   ├── constants.hpp
    249. │   │   ├── constants.inl
    250. │   │   ├── epsilon.hpp
    251. │   │   ├── epsilon.inl
    252. │   │   ├── integer.hpp
    253. │   │   ├── integer.inl
    254. │   │   ├── matrix_access.hpp
    255. │   │   ├── matrix_access.inl
    256. │   │   ├── matrix_integer.hpp
    257. │   │   ├── matrix_inverse.hpp
    258. │   │   ├── matrix_inverse.inl
    259. │   │   ├── matrix_transform.hpp
    260. │   │   ├── matrix_transform.inl
    261. │   │   ├── noise.hpp
    262. │   │   ├── noise.inl
    263. │   │   ├── packing.hpp
    264. │   │   ├── packing.inl
    265. │   │   ├── quaternion.hpp
    266. │   │   ├── quaternion.inl
    267. │   │   ├── quaternion_simd.inl
    268. │   │   ├── random.hpp
    269. │   │   ├── random.inl
    270. │   │   ├── reciprocal.hpp
    271. │   │   ├── round.hpp
    272. │   │   ├── round.inl
    273. │   │   ├── type_aligned.hpp
    274. │   │   ├── type_precision.hpp
    275. │   │   ├── type_precision.inl
    276. │   │   ├── type_ptr.hpp
    277. │   │   ├── type_ptr.inl
    278. │   │   ├── ulp.hpp
    279. │   │   ├── ulp.inl
    280. │   │   └── vec1.hpp
    281. │   ├── gtx
    282. │   │   ├── associated_min_max.hpp
    283. │   │   ├── associated_min_max.inl
    284. │   │   ├── bit.hpp
    285. │   │   ├── bit.inl
    286. │   │   ├── closest_point.hpp
    287. │   │   ├── closest_point.inl
    288. │   │   ├── color_encoding.hpp
    289. │   │   ├── color_encoding.inl
    290. │   │   ├── color_space.hpp
    291. │   │   ├── color_space.inl
    292. │   │   ├── color_space_YCoCg.hpp
    293. │   │   ├── color_space_YCoCg.inl
    294. │   │   ├── common.hpp
    295. │   │   ├── common.inl
    296. │   │   ├── compatibility.hpp
    297. │   │   ├── compatibility.inl
    298. │   │   ├── component_wise.hpp
    299. │   │   ├── component_wise.inl
    300. │   │   ├── dual_quaternion.hpp
    301. │   │   ├── dual_quaternion.inl
    302. │   │   ├── easing.hpp
    303. │   │   ├── easing.inl
    304. │   │   ├── euler_angles.hpp
    305. │   │   ├── euler_angles.inl
    306. │   │   ├── extended_min_max.hpp
    307. │   │   ├── extended_min_max.inl
    308. │   │   ├── extend.hpp
    309. │   │   ├── extend.inl
    310. │   │   ├── exterior_product.hpp
    311. │   │   ├── exterior_product.inl
    312. │   │   ├── fast_exponential.hpp
    313. │   │   ├── fast_exponential.inl
    314. │   │   ├── fast_square_root.hpp
    315. │   │   ├── fast_square_root.inl
    316. │   │   ├── fast_trigonometry.hpp
    317. │   │   ├── fast_trigonometry.inl
    318. │   │   ├── float_notmalize.inl
    319. │   │   ├── functions.hpp
    320. │   │   ├── functions.inl
    321. │   │   ├── gradient_paint.hpp
    322. │   │   ├── gradient_paint.inl
    323. │   │   ├── handed_coordinate_space.hpp
    324. │   │   ├── handed_coordinate_space.inl
    325. │   │   ├── hash.hpp
    326. │   │   ├── hash.inl
    327. │   │   ├── integer.hpp
    328. │   │   ├── integer.inl
    329. │   │   ├── intersect.hpp
    330. │   │   ├── intersect.inl
    331. │   │   ├── io.hpp
    332. │   │   ├── io.inl
    333. │   │   ├── log_base.hpp
    334. │   │   ├── log_base.inl
    335. │   │   ├── matrix_cross_product.hpp
    336. │   │   ├── matrix_cross_product.inl
    337. │   │   ├── matrix_decompose.hpp
    338. │   │   ├── matrix_decompose.inl
    339. │   │   ├── matrix_factorisation.hpp
    340. │   │   ├── matrix_factorisation.inl
    341. │   │   ├── matrix_interpolation.hpp
    342. │   │   ├── matrix_interpolation.inl
    343. │   │   ├── matrix_major_storage.hpp
    344. │   │   ├── matrix_major_storage.inl
    345. │   │   ├── matrix_operation.hpp
    346. │   │   ├── matrix_operation.inl
    347. │   │   ├── matrix_query.hpp
    348. │   │   ├── matrix_query.inl
    349. │   │   ├── matrix_transform_2d.hpp
    350. │   │   ├── matrix_transform_2d.inl
    351. │   │   ├── mixed_product.hpp
    352. │   │   ├── mixed_product.inl
    353. │   │   ├── normal.hpp
    354. │   │   ├── normal.inl
    355. │   │   ├── normalize_dot.hpp
    356. │   │   ├── normalize_dot.inl
    357. │   │   ├── norm.hpp
    358. │   │   ├── norm.inl
    359. │   │   ├── number_precision.hpp
    360. │   │   ├── number_precision.inl
    361. │   │   ├── optimum_pow.hpp
    362. │   │   ├── optimum_pow.inl
    363. │   │   ├── orthonormalize.hpp
    364. │   │   ├── orthonormalize.inl
    365. │   │   ├── pca.hpp
    366. │   │   ├── pca.inl
    367. │   │   ├── perpendicular.hpp
    368. │   │   ├── perpendicular.inl
    369. │   │   ├── polar_coordinates.hpp
    370. │   │   ├── polar_coordinates.inl
    371. │   │   ├── projection.hpp
    372. │   │   ├── projection.inl
    373. │   │   ├── quaternion.hpp
    374. │   │   ├── quaternion.inl
    375. │   │   ├── range.hpp
    376. │   │   ├── raw_data.hpp
    377. │   │   ├── raw_data.inl
    378. │   │   ├── rotate_normalized_axis.hpp
    379. │   │   ├── rotate_normalized_axis.inl
    380. │   │   ├── rotate_vector.hpp
    381. │   │   ├── rotate_vector.inl
    382. │   │   ├── scalar_multiplication.hpp
    383. │   │   ├── scalar_relational.hpp
    384. │   │   ├── scalar_relational.inl
    385. │   │   ├── spline.hpp
    386. │   │   ├── spline.inl
    387. │   │   ├── std_based_type.hpp
    388. │   │   ├── std_based_type.inl
    389. │   │   ├── string_cast.hpp
    390. │   │   ├── string_cast.inl
    391. │   │   ├── texture.hpp
    392. │   │   ├── texture.inl
    393. │   │   ├── transform2.hpp
    394. │   │   ├── transform2.inl
    395. │   │   ├── transform.hpp
    396. │   │   ├── transform.inl
    397. │   │   ├── type_aligned.hpp
    398. │   │   ├── type_aligned.inl
    399. │   │   ├── type_trait.hpp
    400. │   │   ├── type_trait.inl
    401. │   │   ├── vec_swizzle.hpp
    402. │   │   ├── vector_angle.hpp
    403. │   │   ├── vector_angle.inl
    404. │   │   ├── vector_query.hpp
    405. │   │   ├── vector_query.inl
    406. │   │   ├── wrap.hpp
    407. │   │   └── wrap.inl
    408. │   ├── integer.hpp
    409. │   ├── mat2x2.hpp
    410. │   ├── mat2x3.hpp
    411. │   ├── mat2x4.hpp
    412. │   ├── mat3x2.hpp
    413. │   ├── mat3x3.hpp
    414. │   ├── mat3x4.hpp
    415. │   ├── mat4x2.hpp
    416. │   ├── mat4x3.hpp
    417. │   ├── mat4x4.hpp
    418. │   ├── matrix.hpp
    419. │   ├── packing.hpp
    420. │   ├── simd
    421. │   │   ├── common.h
    422. │   │   ├── exponential.h
    423. │   │   ├── geometric.h
    424. │   │   ├── integer.h
    425. │   │   ├── matrix.h
    426. │   │   ├── neon.h
    427. │   │   ├── packing.h
    428. │   │   ├── platform.h
    429. │   │   ├── trigonometric.h
    430. │   │   └── vector_relational.h
    431. │   ├── trigonometric.hpp
    432. │   ├── vec2.hpp
    433. │   ├── vec3.hpp
    434. │   ├── vec4.hpp
    435. │   └── vector_relational.hpp
    436. └── lib
    437. └── cmake
    438. └── glm
    439. ├── glmConfig.cmake
    440. └── glmConfigVersion.cmake

    说明:这里要注意,使用glm数学库不用加载和链接库,只需要需要引用hpp文件即可。引用方式具体如下所示,方便很多:

    1. #include // glm::vec3
    2. #include // glm::vec4
    3. #include // glm::mat4
    4. #include // glm::translate, glm::rotate, glm::scale
    5. #include // glm::perspective
    6. #include // glm::pi
    7. glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
    8. {
    9. glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
    10. glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
    11. View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
    12. View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
    13. glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
    14. return Projection * View * Model;
    15. }

    2.2 aarch64交叉编译与移植

    因为是用aarch64交叉编译,需要提前配置环境,安装如下软件:

    1. sudo apt install binutils-aarch64-linux-gnu-dbg binutils-aarch64-linux-gnu cpp-aarch64-linux-gnu \
    2. g++-10-aarch64-linux-gnu g++-9-aarch64-linux-gnu g++-aarch64-linux-gnu g++ \
    3. gcc-10-aarch64-linux-gnu-base gcc-9-aarch64-linux-gnu-base gcc-aarch64-linux-gnu \
    4. pkg-config-aarch64-linux-gnu qemu-efi-aarch64 gcc arch-test

    对于glm的交叉编译就简单很多了,只需要执行aarch64交叉编译相关命令,如下:

    1. $mkdir aarch64build
    2. $cd aarch64build
    3. $CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ cmake ..
    4. $make
    5. $make DESTDIR=$PWD/out_aarch64 install

    最后生成内容与ubuntu PC端内容相同。

  • 相关阅读:
    Ai作图可控性演进——从SD到MJ
    【IoT】成功十大因素,命、运、风水 、、贵人、养生,哪个最重要?
    关于集合list去除两端[]中括号;String类型字符串转换成集合
    【数据可视化】Data Reduction和加利福尼亚的房价数据集数据可视化以及Kettle的初步介绍
    2024年绍兴市各区县高新技术企业认定奖励补助政策及绍兴高新企业申报奖励条件
    博客系统(java,MySQL,HTML)
    大型电商网站的异步多级缓存及nginx数据本地化动态渲染架构
    20230910java面经整理
    电机保护器究竟该怎么选择
    定积分的应用:几何应用与物理应用
  • 原文地址:https://blog.csdn.net/vviccc/article/details/126311354