Code review comment for ~rafaeldtinoco/ubuntu/+source/qemu:lp1805256-bionic-refix

Revision history for this message
dann frazier (dannf) wrote :

Since I'm not familiar with TARGET_ARM, I did a quick check on arm64 to confirm it DTRT. I added the following code to util/async.c:

#ifdef TARGET_ARM
#error "TARGET_ARM DEFINED, YAY!"
#else
#error "ERROR: TARGET_ARM *NOT* DEFINED!"
#endif

And the build failed with:
/home/ubuntu/qemu-2.11+dfsg/util/async.c: In function ‘aio_ctx_prepare’:
/home/ubuntu/qemu-2.11+dfsg/util/async.c:227:2: error: #error "ERROR: TARGET_ARM *NOT* DEFINED!"
 #error "ERROR: TARGET_ARM *NOT* DEFINED!"
  ^~~~~

So is TARGET_ARM really what we want? Should we use the GCC defs instead - i.e. "#ifdef __aarch64__" - or "#if defined(__aarch64__) || defined(__arm__)", if we also want it to apply to armhf?

review: Needs Fixing

« Back to merge proposal